diff options
| author | Mistivia <i@mistivia.com> | 2025-11-17 01:26:24 +0800 |
|---|---|---|
| committer | Mistivia <i@mistivia.com> | 2025-11-17 01:26:24 +0800 |
| commit | 0a012e1f97cc66e7b9d76a8eb3febad1d37312d8 (patch) | |
| tree | 043f9ba2a199be74528c205d4a928e8d8b38eac3 /ircbot/urltitle.py | |
| parent | 07f98d9aecb6998cdc1dd649c12d6e49bed67f67 (diff) | |
Diffstat (limited to 'ircbot/urltitle.py')
| -rw-r--r-- | ircbot/urltitle.py | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/ircbot/urltitle.py b/ircbot/urltitle.py index 2d06fdc..d367d17 100644 --- a/ircbot/urltitle.py +++ b/ircbot/urltitle.py @@ -13,13 +13,9 @@ title_regex = re.compile( ) headers = { - "User-Agent": "spider/2.1", - "Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7", - "Accept-Encoding": "gzip, deflate, br", - "Accept-Language": "zh-CN,zh;q=0.9,en;q=0.8,en-GB;q=0.7,en-US;q=0.6", - "Connection": "keep-alive", - "DNT": "1", - "Upgrade-Insecure-Requests": "1", + "User-Agent": "Mozilla/5.0 (compatible; The Lounge IRC Client; +https://github.com/thelounge/thelounge)" + + " facebookexternalhit/1.1 Twitterbot/1.0", + "X-Purpose": "preview", } def url_titles(text): |
