Forum Discussion
Another Web Scraping Query
Hi, jmillsjmills
Yes, only Pro license users can apply for a support ticket.
For your question, can you share the url and the “Headers” of this https request to us?Like this :
Thank you for your time and sharing, and thank you for your support and understanding of PowerBI!
Best Regards,
Aniya Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Sure! Thanks
I am now working with this one:
and the headers are:
- v-yueyunzh-msft3 years agoCommunity Support
Hi , jmillsjmills
Can you try to use this to test?
let url = "https://www.betfred.com/services/SportsBook/event?language=uk&type=event&eventid=22385490.2&dataflag...[your url should replace here]", headers = [#"accept"="application/json",#"content-type"="application/json",#"referer"="https://www.betfred.com/sports/event/22385490.2",#"user-agent"="Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/107.0.0.0 Safari/537.36 Edg/107.0.1418.52",#"cookies"="your cookies"], response = Web.Contents( url, [ Headers = headers ] ), jsonResponse = Json.Document(response) in jsonResponseYou need to midify the "url" , "cookies" in this code.
Thank you for your time and sharing, and thank you for your support and understanding of PowerBI!
Best Regards,
Aniya Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
- jmillsjmills3 years agoHelper III
I really appreciate your patience but i'm afraid it's still not working on my end, with the same error. Was that working from your side?
- v-yueyunzh-msft3 years agoCommunity Support
Hi, jmillsjmills
This is really strange, for you "F12" screenshot does return data in JSON format. But in PQ it returns HTML, first of all, you can click the "response" to see If there is data returned, and see what the returned data is, whether it is HTML-type data?And can you share the "response" step return in the PQ screenshot?
If the html , can you try to use the "Web.Page(response)" to get the data ?
Thank you for your time and sharing, and thank you for your support and understanding of PowerBI!
Best Regards,
Aniya Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly