From 3a5d5c3a916c37e46411a9fc0c9660a49fa81f17 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20F=C3=A4hrmann?= Date: Tue, 28 Jun 2022 17:38:58 +0200 Subject: [PATCH] update default User-Agent header to Firefox 102 ESR snd update headers and ciphers for "browser": "firefox" --- docs/configuration.rst | 2 +- docs/gallery-dl.conf | 2 +- gallery_dl/extractor/common.py | 18 +++++++++++------- gallery_dl/version.py | 2 +- 4 files changed, 14 insertions(+), 10 deletions(-) diff --git a/docs/configuration.rst b/docs/configuration.rst index b33167b1..4b23e132 100644 --- a/docs/configuration.rst +++ b/docs/configuration.rst @@ -496,7 +496,7 @@ extractor.*.user-agent Type ``string`` Default - ``"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Firefox/78.0"`` + ``"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Firefox/102.0"`` Description User-Agent header value to be used for HTTP requests. diff --git a/docs/gallery-dl.conf b/docs/gallery-dl.conf index cf719494..78550b51 100644 --- a/docs/gallery-dl.conf +++ b/docs/gallery-dl.conf @@ -10,7 +10,7 @@ "proxy": null, "skip": true, - "user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Firefox/91.0", + "user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Firefox/102.0", "retries": 4, "timeout": 30.0, "verify": true, diff --git a/gallery_dl/extractor/common.py b/gallery_dl/extractor/common.py index 9cd90594..5c5e29ec 100644 --- a/gallery_dl/extractor/common.py +++ b/gallery_dl/extractor/common.py @@ -256,7 +256,7 @@ class Extractor(): else: headers["User-Agent"] = self.config("user-agent", ( "Mozilla/5.0 (Windows NT 10.0; Win64; x64; " - "rv:91.0) Gecko/20100101 Firefox/91.0")) + "rv:102.0) Gecko/20100101 Firefox/102.0")) headers["Accept"] = "*/*" headers["Accept-Language"] = "en-US,en;q=0.5" headers["Accept-Encoding"] = "gzip, deflate" @@ -713,16 +713,21 @@ _browser_cookies = {} HTTP_HEADERS = { "firefox": ( - ("User-Agent", "Mozilla/5.0 ({}; rv:91.0) " - "Gecko/20100101 Firefox/91.0"), + ("User-Agent", "Mozilla/5.0 ({}; rv:102.0) " + "Gecko/20100101 Firefox/102.0"), ("Accept", "text/html,application/xhtml+xml,application/xml;q=0.9," - "image/avif,*/*;q=0.8"), + "image/avif,image/webp,*/*;q=0.8"), ("Accept-Language", "en-US,en;q=0.5"), - ("Accept-Encoding", "gzip, deflate"), + ("Accept-Encoding", "gzip, deflate, br"), ("Referer", None), + ("DNT", "1"), ("Connection", "keep-alive"), ("Upgrade-Insecure-Requests", "1"), ("Cookie", None), + ("Sec-Fetch-Dest", "empty"), + ("Sec-Fetch-Mode", "no-cors"), + ("Sec-Fetch-Site", "same-origin"), + ("TE", "trailers"), ), "chrome": ( ("Upgrade-Insecure-Requests", "1"), @@ -755,8 +760,7 @@ SSL_CIPHERS = { "AES128-GCM-SHA256:" "AES256-GCM-SHA384:" "AES128-SHA:" - "AES256-SHA:" - "DES-CBC3-SHA" + "AES256-SHA" ), "chrome": ( "TLS_AES_128_GCM_SHA256:" diff --git a/gallery_dl/version.py b/gallery_dl/version.py index cb8379e9..2a568792 100644 --- a/gallery_dl/version.py +++ b/gallery_dl/version.py @@ -6,4 +6,4 @@ # it under the terms of the GNU General Public License version 2 as # published by the Free Software Foundation. -__version__ = "1.22.2" +__version__ = "1.22.3-dev"