You can download the information as an XLS/CSV file from Bricklink (Catalogue -> Catalogue Download, and be sure to check the box for weight) and let the program use this list as a base information.
You have the part number in there and the weight.
You have the part number in there and the weight.