Jump to content

Scrape Multiple Page Table from Website


Recommended Posts

Having a problem to set up what I'm trying to do:

I want to scrape the data from a soccer stats webpage http://us.soccerway.com/teams/venezuela/margarita/29769/

I want to scrape specifically the data within the small mutli-page table of matches in the middle of the page (see image attached)

 

I think that _IETableGetCollection and _IETableWriteToArray should be where i should go....however I'm not clear on how to harness the table since I can't find it in the page source code. 

I'm super new at all of this....so any help is most appreciated!!

Here is what I have so far:

#include <Array.au3>
#include <IE.au3>

$oIE =
_IECreate("http://us.soccerway.com/teams/venezuela/margarita/29769/")

;Not sure how to actually isolate the table I want in the pagesource
$Table =
_IETableGetCollection("http://us.soccerway.com/teams/venezuela/margarita/29769/")

$aTableData = _IETableWriteToArray($Table)

 

 

 

TabletoGet.png

Link to post
Share on other sites

Try this --

#include <Array.au3>
#include <IE.au3>

Local $oIE = _IECreate("http://us.soccerway.com/teams/venezuela/margarita/29769/")

$oDiv = _IEGetObjById($oIE, 'page_team_1_block_team_matches_summary_7')
$oTable = _IETableGetCollection($oDiv, 0)

$aMatches = _IETableWriteToArray($oTable, True)
_ArrayDisplay($aMatches, 'Matches')

 

Link to post
Share on other sites

I have successfully scraped some of the data from a table on a webpage

However, my problem is the table has multiple pages.

I don't know how I would be able to grab all of the data through all of the pages

Here is the code

#include <Array.au3>
#include <IE.au3>

Local $oIE = _IECreate("http://us.soccerway.com/teams/venezuela/margarita/29769/")

$oDiv = _IEGetObjById($oIE, 'page_team_1_block_team_matches_summary_7')
$oTable = _IETableGetCollection($oDiv, 0)

$aMatches = _IETableWriteToArray($oTable, True)
_ArrayDisplay($aMatches, 'Matches')
Link to post
Share on other sites

Ok.....the "link" that I need to click isn't the normal kind of links I usually see  

it is some sort of link without a href...

 

I took a stab at trying to Click by the corresponding text associated with it (like it were a string)

_IELinkClickByText($oIE,"« Previous")

but that didn't work

Something specific need to be done for this specific type of "link"?

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...