Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi,
I'm trying to scrap text from a website (https://find.plasticsurgery.org/country/united%20states/?page=1). The website I'm trying to extract data from is arranged like this:
As I want all pages of data, I use the page number in the URL to create a function with the variable name "PageStart":
(PageStart as text)=>
let
Source = Web.BrowserContents("https://find.plasticsurgery.org/country/united%20states/?page="&PageStart&""),
#"Extracted Table From Html" = Html.Table(Source, {{"Phys", "H3 .ignore-click"}, {"Loca", "[itemprop=""address""]"}}, [RowSelector=".resultSet"]),
#"Changed Type" = Table.TransformColumnTypes(#"Extracted Table From Html",{{"Phys", type text}, {"Loca", type text}})
in
#"Changed Type"
I apply a modulo to filter by sets of 12 (there are 12 items per page).
Powerquery editor is able to pull the data into a table
As you can see the preview result is in a table in power query editor. There predicted to be ~8,000 rows of data. Not sure exactly.
I click "close & apply". It will indicate that it has loaded the first ~400 rows but before giving any output it gives this error message
Failed to save modifications to the server. Error returned: 'OLE DB or ODBC error: [DataSource.Error] We were unable to retrieve the contents of the web page..'
Any help is appreciated!
Best,
Brian
Hi @pauperdoc ,
According to your description, I used your code to create a query, after I enter 1 in the function, return a table like this:
Haven't found any error, I attach my sample below for your reference, you can download it to see the difference.
Best Regards,
Community Support Team _ kalyj
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.