From: Oleg Broytman Date: Thu, 1 Aug 2024 10:03:03 +0000 (+0300) Subject: Feat(Robots): Upgrade headers X-Git-Tag: 5.4.0~4 X-Git-Url: https://git.phdru.name/?a=commitdiff_plain;h=b24ca425d6014c0cf1368f5c1b036af0cd1bbfbc;p=bookmarks_db.git Feat(Robots): Upgrade headers --- diff --git a/Robots/bkmk_robot_base.py b/Robots/bkmk_robot_base.py index 65f0694..2d186ac 100644 --- a/Robots/bkmk_robot_base.py +++ b/Robots/bkmk_robot_base.py @@ -25,13 +25,14 @@ from parse_html import parse_html # Fake headers to pretend this is a real browser -_user_agent = "Mozilla/5.0 (X11; U; Linux 2.6 i686; en)" -" Gecko/20001221 Firefox/2.0.0" -_x_user_agent = "bookmarks_db (Python %d.%d.%d)" % sys.version_info[:3] +_user_agent = 'Mozilla/5.0 (X11; Linux x86_64; rv:120.0) ' \ + 'Gecko/20100101 Firefox/120.0' +_x_user_agent = 'bookmarks_db (Python %d.%d.%d)' % sys.version_info[:3] request_headers = { - 'Accept': '*/*', - 'Accept-Language': 'ru,en', + 'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,' + 'image/avif,image/webp,image/png,image/svg+xml,*/*;q=0.8', + 'Accept-Language': 'ru,en-US;q=0.7,en;q=0.3', 'Cache-Control': 'max-age=300', 'Connection': 'close', 'Referer': '/',