I'm searching for a solution
I try to get the images from:
<pics>
<pic>240006.jpg</pic>
<pic>240006_2.jpg</pic>
</pics>
Wel with this code:
for x in root.iter('product'):
pics =x.findall('pics/pic')
images = "https://cdn.edc-internet.nl/800/" + pics[0].text + ";" + "https://cdn.edc-internet.nl/800/" + pics[1].text + ";" + "https://cdn.edc-internet.nl/800/" + pics[2].text
print(images)
With some product having 2 images, it creates a "List out of range" I want to check if there is a value if not the let online see the 2 or even 1 image link.
I have tried it with an if statement That failed, the i had try it with an try: But that gives me only the value with 3 pictures