sarge 0 Posted November 20, 2010 Report Share Posted November 20, 2010 Is it possible to scrape two bits of adjacent data from a line on a page and pop them into a CSV file? For example, I'm trying to get all the image URLs and the product descriptions from this page : http://www.pinchinpipesandfittings.co.uk/ABS_Pipe_Fittings.html into a CSV list so I can match them up in a database. Possible? If so, can anyone point me to a tutorial, or i'll even bung someone a few quid if they can knock out a script. Quote Link to post Share on other sites
IRobot 43 Posted November 20, 2010 Report Share Posted November 20, 2010 Is it possible to scrape two bits of adjacent data from a line on a page and pop them into a CSV file?Yes, mate. For example, I'm trying to get all the image URLs and the product descriptions from this page : http://www.pinchinpipesandfittings.co.uk/ABS_Pipe_Fittings.html into a CSV list so I can match them up in a database. Possible? If so, can anyone point me to a tutorial, or i'll even bung someone a few quid if they can knock out a script.Yes. The attached example shows how to scrape the image URL's to a .txt file. You will need to create another list for the descriptions, and save to a CSV. For further info., please see the tutorials on scraping and CSV files here: http://ubotstudio.com/tutorials.aspx scraper.ubot Quote Link to post Share on other sites
sarge 0 Posted November 20, 2010 Author Report Share Posted November 20, 2010 Thanks for that. I looked through the CSV file tutorial, all fine, my one sticking point is the 'adjacent' bit of the formula. I can see how to grab the images (wildcards, wondered what those were for!) but getting the description next to it looks a little tricker. Any ideas? Quote Link to post Share on other sites
MiriamMB 63 Posted November 20, 2010 Report Share Posted November 20, 2010 You can use page scrape to scrape the description to a different place, like a list, and then turn the list into a table column or row with the variable commands( Add list to table commands) If you're using choose by attribute, I think you can choose the description by the outer html and scrape between the tags. this code works: Just remember, you can convert scraped items that have been placed in a list into table items now. Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.