Skip to content

Commit

Permalink
🐛 Fix user agent
Browse files Browse the repository at this point in the history
  • Loading branch information
omg-xtao committed Jun 28, 2024
1 parent 9e87a19 commit 70b6fcb
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion func/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@
from pathlib import Path

BASE_URL = "https://api.encore.moe/zh-Hans"
client = AsyncClient(timeout=60.0)
headers = {
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/118.0.0.0 Safari/537.36",
}
client = AsyncClient(timeout=60.0, headers=headers)
data_path = Path("data")
data_path.mkdir(exist_ok=True)

Expand Down

0 comments on commit 70b6fcb

Please sign in to comment.