From b24ca425d6014c0cf1368f5c1b036af0cd1bbfbc Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Thu, 1 Aug 2024 13:03:03 +0300 Subject: [PATCH] Feat(Robots): Upgrade headers --- Robots/bkmk_robot_base.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) 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': '/', -- 2.39.5