fix default Firefox user agent string
note to self: do not trust some random third-party website
This commit is contained in:
@@ -534,7 +534,7 @@ extractor.*.user-agent
|
|||||||
Type
|
Type
|
||||||
``string``
|
``string``
|
||||||
Default
|
Default
|
||||||
``"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:115.0) Gecko/20100101 Firefox/115.0"``
|
``"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/115.0"``
|
||||||
Description
|
Description
|
||||||
User-Agent header value to be used for HTTP requests.
|
User-Agent header value to be used for HTTP requests.
|
||||||
|
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
"proxy": null,
|
"proxy": null,
|
||||||
"skip": true,
|
"skip": true,
|
||||||
|
|
||||||
"user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:115.0) Gecko/20100101 Firefox/115.0",
|
"user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/115.0",
|
||||||
"retries": 4,
|
"retries": 4,
|
||||||
"timeout": 30.0,
|
"timeout": 30.0,
|
||||||
"verify": true,
|
"verify": true,
|
||||||
|
|||||||
@@ -299,7 +299,7 @@ class Extractor():
|
|||||||
useragent = self.config("user-agent")
|
useragent = self.config("user-agent")
|
||||||
if useragent is None:
|
if useragent is None:
|
||||||
useragent = ("Mozilla/5.0 (Windows NT 10.0; Win64; x64; "
|
useragent = ("Mozilla/5.0 (Windows NT 10.0; Win64; x64; "
|
||||||
"rv:115.0) Gecko/20100101 Firefox/115.0")
|
"rv:109.0) Gecko/20100101 Firefox/115.0")
|
||||||
elif useragent == "browser":
|
elif useragent == "browser":
|
||||||
useragent = _browser_useragent()
|
useragent = _browser_useragent()
|
||||||
headers["User-Agent"] = useragent
|
headers["User-Agent"] = useragent
|
||||||
@@ -831,8 +831,8 @@ _browser_cookies = {}
|
|||||||
|
|
||||||
HTTP_HEADERS = {
|
HTTP_HEADERS = {
|
||||||
"firefox": (
|
"firefox": (
|
||||||
("User-Agent", "Mozilla/5.0 ({}; rv:115.0) "
|
("User-Agent", "Mozilla/5.0 ({}; "
|
||||||
"Gecko/20100101 Firefox/115.0"),
|
"rv:109.0) Gecko/20100101 Firefox/115.0"),
|
||||||
("Accept", "text/html,application/xhtml+xml,application/xml;q=0.9,"
|
("Accept", "text/html,application/xhtml+xml,application/xml;q=0.9,"
|
||||||
"image/avif,image/webp,*/*;q=0.8"),
|
"image/avif,image/webp,*/*;q=0.8"),
|
||||||
("Accept-Language", "en-US,en;q=0.5"),
|
("Accept-Language", "en-US,en;q=0.5"),
|
||||||
|
|||||||
Reference in New Issue
Block a user