fix: Add a fake user agent
This commit is contained in:
+7
-1
@@ -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):
|
||||||
|
|||||||
Reference in New Issue
Block a user