Spaces:
Running
Running
Fix: faster article scraping, reduced timeout
Browse files
main.py
CHANGED
|
@@ -834,7 +834,7 @@ def _scrape_with_fallback(url, domain_label):
|
|
| 834 |
# Try each UA (short timeout — if site blocks us, fail fast)
|
| 835 |
for ua in _UAS:
|
| 836 |
try:
|
| 837 |
-
r = _rl_get(url, headers=ua, timeout=
|
| 838 |
if not r or r.status_code != 200:
|
| 839 |
continue
|
| 840 |
r.encoding = "utf-8"
|
|
|
|
| 834 |
# Try each UA (short timeout — if site blocks us, fail fast)
|
| 835 |
for ua in _UAS:
|
| 836 |
try:
|
| 837 |
+
r = _rl_get(url, headers=ua, timeout=4, domain=domain)
|
| 838 |
if not r or r.status_code != 200:
|
| 839 |
continue
|
| 840 |
r.encoding = "utf-8"
|