Hi all, I've got a quick question that has been covered before but having trouble implementing it (reference thread):
access-programmers.co.uk/forums/showthread.php?t=194390
I have created a form to enter component details, however it would be great to take it to the next level and retrieve the data from the supplier's website once the part number is entered.
The part number is in the following form (e.g): 2124017
and the website to go to is (e.g.): uk.farnell.com/2124017
I managed to get VBA to download the page, however, I am now looking for a way to save the image to a folder by it's part number, and then get the following from the source code (an example of the data I would like to get from the example page above):
Manufacturer Part No: CRCW120610K0FKEA
Resistance: 10
Multiplier: K
Power Rating: 250
Resistance Tolerance: 1
Resistor Case Style: 1206
I noticed that all of this information is available in the URL and title when the page is redirected, however, as the data may not be the same for every part and the manufacturers part number not the same length, plus me wanting to use the code for more than one website, I was hoping someone could help me retrieve data between two bits of the source code. I.e.
So it could take the data between
and
Finally, to download the image within the following
It won't always be perfect, however will be pretty accurate and a big time saver hopefully
Any help appreciated, thanks!
access-programmers.co.uk/forums/showthread.php?t=194390
I have created a form to enter component details, however it would be great to take it to the next level and retrieve the data from the supplier's website once the part number is entered.
The part number is in the following form (e.g): 2124017
and the website to go to is (e.g.): uk.farnell.com/2124017
I managed to get VBA to download the page, however, I am now looking for a way to save the image to a folder by it's part number, and then get the following from the source code (an example of the data I would like to get from the example page above):
Manufacturer Part No: CRCW120610K0FKEA
Resistance: 10
Multiplier: K
Power Rating: 250
Resistance Tolerance: 1
Resistor Case Style: 1206
I noticed that all of this information is available in the URL and title when the page is redirected, however, as the data may not be the same for every part and the manufacturers part number not the same length, plus me wanting to use the code for more than one website, I was hoping someone could help me retrieve data between two bits of the source code. I.e.
Code:
<dt>Manufacturer Part No:</dt>
<dd>CRCW120610K0FKEA.</dd>
So it could take the data between
Code:
<dt>Manufacturer Part No:</dt><dd>
and be repeated for.</dd>
Code:
<span class="prodAttrName"> Power Rating:</span>
<span class="prodAttrValue">250mW</span>
Finally, to download the image within the following
Code:
<img title="VISHAY DRALORIC,CRCW120610K0FKEA.,RESISTOR, 10K, 0.25W, 1%, 1206" class="mfImageAlt productimg" style="display:block;width:auto;height:auto;" src="/productimages/farnell/standard/1738888-40.jpg" alt="VISHAY DRALORICCRCW120610K0FKEA."></img>
It won't always be perfect, however will be pretty accurate and a big time saver hopefully
