Jump to content
UBot Underground

Scrape two bits of data


Recommended Posts

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.

Link to post
Share on other sites

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

Link to post
Share on other sites

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?

Link to post
Share on other sites

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: scraping to table.jpg

 

Just remember, you can convert scraped items that have been placed in a list into table items now.

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...