вроде как откатился на ошибки парсеров без веб интерфейс
This commit is contained in:
@@ -9,18 +9,10 @@ TEAMS_URL = "https://wfl.rfs.ru/tournament/1061879/teams"
|
||||
|
||||
|
||||
def fetch_html(url: str) -> str:
|
||||
headers = {
|
||||
"User-Agent": "Mozilla/5.0",
|
||||
"Accept": "*/*"
|
||||
}
|
||||
|
||||
try:
|
||||
r = requests.get(url, headers=headers, timeout=20)
|
||||
r.raise_for_status()
|
||||
return r.text
|
||||
|
||||
except requests.exceptions.RequestException as e:
|
||||
return f"Сайт недоступен: {e}"
|
||||
headers = {"User-Agent": "Mozilla/5.0", "Accept": "*/*"}
|
||||
response = requests.get(url, timeout=30, headers=headers)
|
||||
response.raise_for_status()
|
||||
return response.text
|
||||
|
||||
|
||||
def get_links(html) -> list:
|
||||
|
||||
Reference in New Issue
Block a user