digikey-barcode-reader
digikey-barcode-reader copied to clipboard
Digikey Issue
Both example codes provide errors.
type digi_example.txt | digi-reader.py >> output.csv
info: code readed: 0972212000000020292070
error: analizing code: 0972212 reason: list index out of range, u: []
info: code readed: 1786439000000040970570
error: reading digikey page for S9014E-03-ND reason: list index out of range
info: code readed: 3592994000000003521260
info: cannot parse code, no valid format : 3592994000000003521260
type test\test.txt | digi-reader.py >> output.csv
info: code readed: 603-AC0402FR-071ML
info: code readed: 2531105000000020464850
error: reading digikey page for 568-5818-1-ND reason: list index out of range
info: code readed: 609-1041-ND
error: reading digikey page for 609-1041-ND reason: list index out of range
info: code readed: test_unknow_provider
info: cannot parse code, no valid format : test_unknow_provider
This looks just like my results. I had to install beautifulsoup to make it this far, but then I get the "list index out of range" message on almost every line in the file. Nothing is written to the output file when it's finished. The barcodes are good as verified by the Digikey app.
Upon digging in a little further, it looks like startpage.com is not indexing digikey anymore? If I do site:digikey.com {prod_id}
on Google, it pulls up the matching part page in the results but on startpage it finds nothing. So maybe this explains it, since u
comes back empty. Original developer said that Google wouldn't allow bots to query it, if that's true I'm not sure what to do next to get this working again.
I also have the same issue. ;(. I have a ton of parts to scan and enter into partsbox.io.
what is the last 6 digit meaning ?
A track that seems to work for me is to basically go to any product URL (http://www.digikey.com/product-detail/en/keystone-electronics/4245C/36-4245C-ND/1830603
) and replace the last digits with the product number you're interested in :)
I found easy way to get the DK product name by the first 7 digits of the bar code. https://www.digikey.com/classic/forms/dkc/www/productinformationerror.aspx?pid=5022796 from the bar code: 5022796000000010265686 it returns a form with: ... Part Number ... type="text" value="1528-1067-ND" ...