]> git.phdru.name Git - bookmarks_db.git/commitdiff
Feat(Robots): Upgrade headers
authorOleg Broytman <phd@phdru.name>
Thu, 1 Aug 2024 10:03:03 +0000 (13:03 +0300)
committerOleg Broytman <phd@phdru.name>
Thu, 1 Aug 2024 16:02:21 +0000 (19:02 +0300)
Robots/bkmk_robot_base.py

index 65f06941d85f371bcc422e18dfc3dffe4d8d55a9..2d186acb0c211107d485f0e44e6919044f2ac7b1 100644 (file)
@@ -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': '/',