Jump to content
UBot Underground

Recommended Posts

I just installed exbrowser last week, been struggling with the exbrowser scrape table command and the xpath.  Ive watched all the youtube tutorials.  Ive seen single element scrape and a list but not a table and cant seem to make it go.  Here is my stripped down script.  Can someone please help?  Ive come to understand xpath expressions for single and list elements but the table has me in a conundrum:

 

plugin command("ExBrowser.dll", "ExBrowser CleanUp", "No")
plugin command("ExBrowser.dll", "ExBrowser Launcher", "Chrome", "", "")
plugin command("ExBrowser.dll", "ExBrowser Navigate", "https://www.reuters.com/finance/stocks/financial-highlights/INTC")

plugin command("ExBrowser.dll", "ExBrowser Scrape Table", "x://table[@class=\"dataTable\"]", &eps, "InnerText")
         

with of course that last line being the trouble.  I get an error: the index was outside the bounds of the array.

 

Im trying to scrape the first table, the one with a heading "Earnings Per Share**"

 

Any suggestions would be greatly appreciated.

Link to post
Share on other sites

I just installed exbrowser last week, been struggling with the exbrowser scrape table command and the xpath.  Ive watched all the youtube tutorials.  Ive seen single element scrape and a list but not a table and cant seem to make it go.  Here is my stripped down script.  Can someone please help?  Ive come to understand xpath expressions for single and list elements but the table has me in a conundrum:

 

plugin command("ExBrowser.dll", "ExBrowser CleanUp", "No")

plugin command("ExBrowser.dll", "ExBrowser Launcher", "Chrome", "", "")

plugin command("ExBrowser.dll", "ExBrowser Navigate", "https://www.reuters.com/finance/stocks/financial-highlights/INTC")

plugin command("ExBrowser.dll", "ExBrowser Scrape Table", "x://table[@class=\"dataTable\"]", &eps, "InnerText")

         

with of course that last line being the trouble.  I get an error: the index was outside the bounds of the array.

 

Im trying to scrape the first table, the one with a heading "Earnings Per Share**"

 

Any suggestions would be greatly appreciated.

 

The xpath expression is way to broad. Run and element count on that xpath expression and check if the result is only 1. If it's more than 1 you found the problem.

Xpath expressions need to be unique (only 1 match). Otherwise you never know what html code you target with a command or function.

 

Cheers

Dan

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