Spaces:
Sleeping
Sleeping
Update scraper.py
Browse files- 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"
|