Supplies are limited. Contact info@espc.tech right away to save your spot before the conference sells out.
Get your discountScore big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount
Hi, I'm a newby testing some stuff. When I follow some YT tutorials on getting data tables from web pages, in the Power BI Navigator, I don't get any tables, just HTML code and text, which I can preview in the Table View tab. There I can clearly see that the web page is trying to get the cookies consent, while in the Web View tab I see the correct page with the table I'd like to scrape and there is no sign of any cookies-related pop-ups. Also, I have already visited the page in Edge and given the relevant consent. The people in those tutorials haven't encountered anything like this, so any help would be greatly appreciated.
Cheers.
Hi, @alfst28 ,
Power BI’s connector can’t interact with cookie banners or popups like a real browser can. That’s why you just see the HTML or a “cookies required” message in your table preview, even though the Web View tab shows the right data (since that uses your browser session). Here’s what usually works for sites like this:
1. Pass Cookies Manually: If you know the exact cookie set after you accept the consent, you can sometimes “trick” the site with Power Query like this: Source = Web.Contents("https://yourwebsite.com", [Headers=[Cookie="your_cookie_name=your_cookie_value"]])
2. Download the Page After Accepting Cookies: Just save the web page after you’ve accepted all cookies, then load that file into Power BI. It’s manual but can be enough for quick reports.
3. Use a Script or Browser Automation: If you need to do this regularly, a tool like Python’s Selenium can open the page, click “accept,” grab the table, and save it as CSV for Power BI to import. Not as scary as it sounds—there are plenty of tutorials if you Google “Selenium web scraping.”
4. Look for APIs or Data Downloads: Always check if the table is available as a direct download (CSV, JSON, or Excel), or if there’s an API endpoint in the background. Check the Network tab in browser dev tools while the page loads.
Long story short: Power BI can’t click popups or accept cookies on your behalf. But with these workarounds, you can still get the data in, just takes a bit of setup.
If you get stuck grabbing the right cookie value, or want a sample Python script, let me know (or DM me the site and I’ll take a quick look).
have you given consent in power bi web connector for this
if you are scrapping try using beautifulsoup library from python and doing this