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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
myriam_ouan
Regular Visitor

Web query shows empty

Hi guys,

 

I've been trying to scrape data from a company's website, something very simple. I basically want to retrieve the headlines, url and publication date from their news release. 
I've already done similar queries with Google news and other news websites. But for this one I can't seem to figure out the reason why it won't retrieve anything. 

Below is the detail of my query. The output is an empty table. Thanks for any help you can bring. 

let

    Source = Web.Contents("https://ir.tevapharm.com/news-and-events/press-releases/default.aspx"),

    #"Extracted Table From Html" = Html.Table(Source, {{"Column0","a[href^=""/news-""]", each [Attributes][href]}, {"Column1", ".module-news .module_headline"}, {"Column2", ".module-news .module_date-time"}}, [RowSelector=".module-news .module_item-wrap"]),

    #"Replaced Value" = Table.ReplaceValue(#"Extracted Table From Html","/news-","https://www.ir.tevapharm.com/news-",Replacer.ReplaceText,{"Column0"}),

    #"Changed Type" = Table.TransformColumnTypes(#"Replaced Value",{{"Column0", type text}, {"Column1", type text}, {"Column2", type date}}),

    #"Renamed Columns" = Table.RenameColumns(#"Changed Type",{{"Column0", "URL"}, {"Column1", "Headlines"}, {"Column2", "Date"}})

in

    #"Renamed Columns"

8 REPLIES 8
Anonymous
Not applicable

Hi @myriam_ouan ,

 

As I mentioned before, please always use the latest version of PBI.

 

Best Regards,
Eyelyn Qin

myriam_ouan
Regular Visitor

I tried to copy and paste the full code you sent and I received the same error message. The message in French says : we could not retrieve the content from [url]. When I click "go to error" it brings me back to the source (see first screenshot). My version of power BI is May2021 : 2.93.982.0 64-bit

5D7E64FD-3B43-4718-86D1-8B2E7D98E2C8.png

FD1243E5-F368-4B30-97E6-72813D5ADD29.png

Hi @myriam_ouan ,

 

It appears as thought this is a 407 error caused by failed Proxy Authentication.

I'm not an expert in this area, but it may be related to your organisation firewall and/or secure VPN proxy server authentication.

It might help to check with your organisation if they allow browser connections to that URL and, if not, to whitelist it for you.

 

Pete



Now accepting Kudos! If my post helped you, why not give it a thumbs-up?

Proud to be a Datanaut!




Anonymous
Not applicable

Hi @myriam_ouan ,

 

Did you try to create a new blank query and then paste @BA_Pete 's syntax by using

 

Web.BrowserContents()

 

After edit the credential (please choose Anonymous access),I could get data succesfully as well.

Eyelyn9_1-1635837316463.png

 

Eyelyn9_0-1635837233163.png

 

Make sure your PBI is the latest version.

 

Best Regards,
Eyelyn Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

BA_Pete
Super User
Super User

Hi @myriam_ouan ,

 

In your Source Step, try changing Web.Contents("https....) to Web.BrowserContents("https....).

 

BA_Pete_0-1635504741210.png

 

 

Pete



Now accepting Kudos! If my post helped you, why not give it a thumbs-up?

Proud to be a Datanaut!




Hi Pete, 

thanks for your answer. I tried but I have an error message : can't connect to [url]

Hi Pete, 

thanks for your answer. I tried but I have an error message : can't connect to [url]

Hi @myriam_ouan ,

 

I don't know what to suggest I'm afraid - I can't recreate this issue.

If I take your original query and make the Source change, I get all the data just fine.

 

Try pasting this into a new blank query, just in case you have a typo:

let
    Source = Web.BrowserContents("https://ir.tevapharm.com/news-and-events/press-releases/default.aspx"),
    #"Extracted Table From Html" = Html.Table(Source, {{"Column0","a[href^=""/news-""]", each [Attributes][href]}, {"Column1", ".module-news .module_headline"}, {"Column2", ".module-news .module_date-time"}}, [RowSelector=".module-news .module_item-wrap"]),
    #"Replaced Value" = Table.ReplaceValue(#"Extracted Table From Html","/news-","https://www.ir.tevapharm.com/news-",Replacer.ReplaceText,{"Column0"}),
    #"Changed Type" = Table.TransformColumnTypes(#"Replaced Value",{{"Column0", type text}, {"Column1", type text}, {"Column2", type date}}),
    #"Renamed Columns" = Table.RenameColumns(#"Changed Type",{{"Column0", "URL"}, {"Column1", "Headlines"}, {"Column2", "Date"}})
in
    #"Renamed Columns"

 

Pete



Now accepting Kudos! If my post helped you, why not give it a thumbs-up?

Proud to be a Datanaut!




Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors