Arafath10 commited on
Commit
628e50e
1 Parent(s): ac10c70

Update scraper.py

Browse files
Files changed (1) hide show
  1. scraper.py +2 -1
scraper.py CHANGED
@@ -10,7 +10,8 @@ class Scraper:
10
  @staticmethod
11
  async def power_scrapper_2(url):
12
  async with async_playwright() as p:
13
- browser = await p.chromium.launch(headless=True)
 
14
  # Create a new browser context with a realistic user-agent
15
  context = await browser.new_context(
16
  user_agent="Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36"
 
10
  @staticmethod
11
  async def power_scrapper_2(url):
12
  async with async_playwright() as p:
13
+ #browser = await p.chromium.launch(headless=True)
14
+ browser = await p.webkit.launch(headless=True) # Switch to WebKit
15
  # Create a new browser context with a realistic user-agent
16
  context = await browser.new_context(
17
  user_agent="Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36"