Forum Discussion
Scrape only relevant images from web
- 6 years ago
Thanks again for your suggestion. I did eventually succeed in importing the image URLs, albeit tweaking the M code for the different websites. Just for general information, I imported about 3,500 different URLs, from about 1,650 different pages from 4 different websites. The whole process took over 6 hours probably (in fact I started the queries at around 20:00, checked well past midnight and it was more or less half way there...).
I subsequently decided I was also interest in importing some text from each of those pages, but have given up trying to work out the code for the selector etc needed...
Thanks again!
Thank you for taking the time to give this a shot. Unfortunately the images rendered are not what I am looking for:
I actually think my original code does not include the images I am looking for. If I go into the webpage 's code, what I'm trying to get at is the following:
or...
which is why I started playing around with "RowSelector", but as I say, I know veeeery little about M and even less about CSS selectors..
The thing is I need to write queries for a number of webpages to import image urls (which will all be of course have different structures), and I'm trying to understand the coding patterns/structure to apply to each website (which entails providing the code necessary to reach out to a particuar segment of the webpage's code).
Thanks again!
If you change my final filter to look for "races" vs "yacht" is that not the two images you are referring to?
- PaulDBrown6 years agoCommunity Champion
Thanks again for your suggestion. I did eventually succeed in importing the image URLs, albeit tweaking the M code for the different websites. Just for general information, I imported about 3,500 different URLs, from about 1,650 different pages from 4 different websites. The whole process took over 6 hours probably (in fact I started the queries at around 20:00, checked well past midnight and it was more or less half way there...).
I subsequently decided I was also interest in importing some text from each of those pages, but have given up trying to work out the code for the selector etc needed...
Thanks again!