fix: Add a fake user agent

master
Abdussamet Kocak 4 years ago
parent f31f0def29
commit 5b4c818451

@ -8,7 +8,13 @@ from aiocache import cached, Cache
from bs4 import BeautifulSoup from bs4 import BeautifulSoup
from pydantic import BaseModel from pydantic import BaseModel
_http = httpx.AsyncClient(timeout=20, follow_redirects=True) _http = httpx.AsyncClient(
timeout=20,
follow_redirects=True,
headers={
'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:98.0) Gecko/20100101 Firefox/98.0'
}
)
class PrayerTimes(BaseModel): class PrayerTimes(BaseModel):

Loading…
Cancel
Save