yes product url and iamge url are different. They are not same. You can see my full code
not getting image src in my BeautifulSoup csv file
not getting image src in my BeautifulSoup csv file
|
I ask because you started to speak of multiple img links, but getting one product link in the csv file
(Sep-14-2020, 04:00 PM)farhan275 Wrote: I am getting multiple images url for every product (Sep-14-2020, 04:00 PM)farhan275 Wrote: But in my csv still now getting only one product url from each product In my opinion (not able to test) but your latest code with io.open("amazon.csv", "a",encoding="utf-8") as f: for url in dpsoup.select('span.a-button-text > img')[3:10]: print(f"image link:{url['src']}") writeFile = csv.writer(f) writeFile.writerow([url['src'],product_link ,title,rating,price])should write multiple img urls per product (each on different line) The only explanation is that the code you run is actually different from the one you show here.
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link Create MCV example Debug small programs |
|
Possibly Related Threads… | |||||
Thread | Author | Replies | Views | Last Post | |
BeautifulSoup Showing none while extracting image url | josephandrew | 0 | 2,640 |
Sep-20-2021, 11:40 AM Last Post: josephandrew |
|
Image Scraper (beautifulsoup), stopped working, need to help see why | woodmister | 9 | 5,660 |
Jan-12-2021, 04:10 PM Last Post: woodmister |
Users browsing this thread: 1 Guest(s)