Scraping table from site with multiple pages but same url

melon2112

New Member
Joined
Oct 9, 2024
Messages
1
Office Version
  1. 365
Platform
  1. Windows
I cannot figure it out. I am trying to scrape a table from the website CapWages - NHL Salary Cap Data which will scrape the first 50 rows but because the website makes you click next page, it will not display the next ones. Normally, websites add to the url to advance the page...but this site does not do that...it just stays the same. I used to be able to just manipulate the advanced power query to add to the url but here I cannot figure out how to get the next pages.

currently I just have this...
Power Query:
let
    Source = Web.Page(Web.Contents("https://capwages.com/players/active")),
    Data0 = Source{0}[Data],
    #"Changed Type" = Table.TransformColumnTypes(Data0,{{"PLAYERS", type text}, {"TEAM", type text}, {"POS", type text}, {"HAND", type text}, {"AGE", Int64.Type}, {"WEIGHT", type text}, {"HEIGHT", type text}, {"GP", Int64.Type}, {"TOI", type text}, {"G", Int64.Type}, {"A", Int64.Type}, {"PTS", Int64.Type}, {"GAA", type number}, {"SV%", type number}, {"CAP HIT", Currency.Type}, {"AAV", Currency.Type}, {"TERM", type text}, {"WAIVERS EXEMPT", type text}, {"BASE SALARY", Currency.Type}, {"SIGNING BONUS", Currency.Type}, {"PERF BONUS", Currency.Type}, {"TYPE", type text}})
in
    #"Changed Type"

I tried using python with beautifulsoup but encounter same problem.

If anyone knows or have suggestions, please let me know.

Thank you in advance.
 

Excel Facts

Copy PDF to Excel
Select data in PDF. Paste to Microsoft Word. Copy from Word and paste to Excel.

Forum statistics

Threads
1,223,868
Messages
6,175,084
Members
452,611
Latest member
bls2024

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