Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
Cmoore
Frequent Visitor

Web Scraping

I am new to web scraping using Power BI. I have had some successes of using the software to extract data from easily built websites and iterated over multiple pages. I am struggling with sites that are heavily coded in java where the data isn't fully displayed in a table. I am trying to connect to a website below and this is the M code;

l

et
Source = Web.BrowserContents("https://www.kirkland.com/lawyers?level=9ff51805-f16d-4d64-9794-6cff75200182"),
#"Extracted Table From Html" = Html.Table(Source, {{"Persons Name", ".person-result__name"}, each [Attributes][href]?}, [RowSelector=".person-result__main > A"]),
#"Changed Type" = Table.TransformColumnTypes(#"Extracted Table From Html",{{"Persons Name", type text}})
in
#"Changed Type"

 

I am just trying to extract the person name for each of the occurences on the page. I get the error "We Cannot covert a value of type function to type list". Would you be able to offer any guidance to what I'm doing wrong on a website like this?

2 REPLIES 2
Cmoore
Frequent Visitor

Thanks for getting back to me, much appreciated.

Daryl-Lynch-Bzy
Community Champion
Community Champion

Sorry @Cmoore - I don't think Power Query can help in this situation.  If you look at the result of the "Web.BrowserContents".  Show that Javascript is disabled, so you get a big text string.

DarylLynchBzy_0-1644405773922.png

The most interesting part of this string is the value="PE1...." part.  This can be read using:

 Text.FromBinary(Web.Contents("https://www.kirkland.com/lawyers?letter=A") , BinaryEncoding.Base64),

but it only returns the page structure not the lawyer data

 

DarylLynchBzy_1-1644406044200.png

 

It looks like you need to use an API to get the information.

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Fabric Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.