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

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.

Reply
jmillsjmills
Helper III
Helper III

Web Scrape: The request was aborted: The connection was closed unexpectedly.

Hello,

 

I'm trying to use Power BI Desktop to connect to the below domain and whenever I attempt doing so it fails and says "Unable to connect. We encountered an error when trying to connect. Details: "The request was aborted: The connection was closed unexpectedly."

 

I posted the URL in a message on here before, but it flagged as spam. The website is BoyleSports (.com!) and if anyone would be able to help me understand why this particular site returns a failure to connect, it would be most appreciated! Perhaps I need to add some parameters/headers for the connection to be successful?

 

I've just been using the Get Data > From Web method to pull in information, but is there a more advanced function required into this instance?

 

Thanks so very much in advance. It is much appreciated!

3 REPLIES 3
v-yiruan-msft
Community Support
Community Support

Hi @jmillsjmills ,

First, please make sure that you can access to the web page by browser. If you can access successfully, it may be caused by the version of TLS or .Net is too low, you can refer the solution in the following thread to resolve it. Any comment or problem, please feel free to let me know.

Underlying connection was closed: An unexpected error occurred

Best Regards
Community Support Team _ Rena Ruan
If this post helps, then please consider Accept it as the solution to help the other members find it more.

Community Support Team _ Rena
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Thanks for your response! It's a simple point I'd missed - that website is not supporting being accessed via Internet Explorer anymore, which I understand is the default browser for Power BI to connect to a site in order to web scrape..

 

So I've fallen at the first hurdle and I assume it doesn't have to do with the TLS! The question is.. is there some possibility to pull in the source code (to then run ExtractFromHTML function), via a different non-Internet-Explorer browser?

 

Thanks so much again for your help! Much appreciated

Hi @jmillsjmills 

Try this

 

    Source =  Web.Page(Web.BrowserContents("https://www.boylesports.com")),

 

 Works for me to download the HTML and can then see the various elements in the page.


If I answered your question please mark my post as the solution.
If my answer helped solve your problem, give it a kudos by clicking on the Thumbs Up.



Did I answer your question? Then please mark my post as the solution.
If I helped you, click on the Thumbs Up to give Kudos.


Blog :: YouTube Channel :: Connect on Linkedin


Proud to be a Super User!


Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors