Jump to content
UBot Underground

scraping text from table.


Recommended Posts

I'm trying to build a bot that will go through a list of url's like this one,

 

http://thickhost.com/test/completed/?q=Canon+Powershot&cat=31388&pages=10

 

and scrape the "Total Number of Items", the "Total Sales" and the "Sales Percentage".

 

I didn't make the page.  Its just a plain table, no ID's or anything to focus on.  I can scrape, but I'm getting all the text.  All I want is to set table cell, #row, col 3, "Total number of items", col 4, Total Sales, col 5 Sales Percentage.  But I want the numbers... :)

 

I'm just not sure how to pull just those 3 numbers from the page.

 

Thanks,

Richard

Link to post
Share on other sites

Thanks Kevin, I'll try that.

 

I'd much rather pull directly from ebay, but like I said, I didn't build this page, so I'm not sure of the full URL or how he's pulling the info.  If you have any ideas on that, I'd appreciate it.

 

Richard

Link to post
Share on other sites
set(#items, $page scrape("Total Number Of Items<br><br>", "<br><br></td>"), "Global")
set(#sales, $page scrape("Total sales<br><br>", "<br><br></td>"), "Global")
set(#salespercent, $page scrape("Sales Percentage<br><br>", "<br><br></td>"), "Global")

 

another way if you want individual variable for some reason

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...