Scraping HTML Table, Multiple Pages, Multiple Searches

Incogneat0

New Member
Joined
Sep 11, 2014
Messages
3
Beginner here with VBA, and absolute newbie on scraping html data. I am looking to scrape the 2nd html table for player projections from Yahoo fantasy football, but these projections are broken into 17 weeks and only 25 entries per page. The url looks like this

Code:
http://football.fantasysports.yahoo.com/f1/9449/players?status=ALL&pos=ALL&cut_type=9&stat1=S_PW_1&myteam=0&sort=PTS&sdir=1&count=0

Where S_PW_x indicates the week, and count=x indicates the starting row. count=x needs to add 25 each time for the next page to to be shown. Ideally, I would scrape until count=300

Each week would be placed on a separate tab, with the projections 1 to 300, so I know a nested loop would be needed where a new worksheet would be created, then the table scraped and placed in the first blank row in a loop until count=300, and then this done 17 times for S_PW_1 to 17

I have been browsing the forums for the better part of today and trying to piece together a code to do this, but am ultimately confusing myself more than clarifying. But I know you all like a challenge. To make it tougher, the league I am is password protected, so accessing the link is going to be impossible unless I give the info to my account. Which I will do in a PM, but not openly.

I know this can be done, and most likely easily by someone who knows VBA much better than myself.

Thanks for reading!!
 

Excel Facts

Create a Pivot Table on a Map
If your data has zip codes, postal codes, or city names, select the data and use Insert, 3D Map. (Found to right of chart icons).

Forum statistics

Threads
1,214,638
Messages
6,120,676
Members
448,977
Latest member
moonlight6

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top