Spaces:
Running
Running
Restore wc2026_scraper.py from c93b544
Browse files- wc2026_scraper.py +1 -1
wc2026_scraper.py
CHANGED
|
@@ -92,7 +92,7 @@ def _search_source(url_tpl, topic, selector, base_url='', limit=6):
|
|
| 92 |
r=requests.get(url,headers=UA,timeout=10,allow_redirects=True);r.encoding='utf-8'
|
| 93 |
soup=BeautifulSoup(r.text,'lxml')
|
| 94 |
for a in soup.select(selector)[:limit*2]:
|
| 95 |
-
t=_clean(a.get('title','') or a.get_text(strip
|
| 96 |
href=a.get('href','')
|
| 97 |
if not t or len(t)<15:continue
|
| 98 |
if not href.startswith('http'):href=base_url+href
|
|
|
|
| 92 |
r=requests.get(url,headers=UA,timeout=10,allow_redirects=True);r.encoding='utf-8'
|
| 93 |
soup=BeautifulSoup(r.text,'lxml')
|
| 94 |
for a in soup.select(selector)[:limit*2]:
|
| 95 |
+
t=_clean(a.get('title','') or a.get_text(strip=True))
|
| 96 |
href=a.get('href','')
|
| 97 |
if not t or len(t)<15:continue
|
| 98 |
if not href.startswith('http'):href=base_url+href
|