Spaces:
Sleeping
Sleeping
Update scraper.py
Browse files- scraper.py +1 -1
scraper.py
CHANGED
@@ -17,7 +17,7 @@ class Scraper:
|
|
17 |
page = await browser.new_page()
|
18 |
|
19 |
# Route to block images, videos, and CSS
|
20 |
-
await page.route("**/*", lambda route: route.abort() if route.request.resource_type in ["image", "media", "stylesheet"] else route.continue_())
|
21 |
|
22 |
await page.goto(url)
|
23 |
|
|
|
17 |
page = await browser.new_page()
|
18 |
|
19 |
# Route to block images, videos, and CSS
|
20 |
+
await page.route("**/*", lambda route: route.abort() if route.request.resource_type in ["image", "media", "stylesheet", "font", "xhr"] else route.continue_())
|
21 |
|
22 |
await page.goto(url)
|
23 |
|