1
0
mirror of https://github.com/spaam/svtplay-dl.git synced 2024-11-27 13:44:14 +01:00

utils.http: increase number of headers

akamai seems to add a bunch of headers for some reason
This commit is contained in:
Johan Andersson 2023-04-19 03:25:31 +02:00
parent ce43d1ba4a
commit 7882f6ddf1

View File

@ -1,3 +1,4 @@
import http.client
import logging import logging
import re import re
from html import unescape from html import unescape
@ -5,10 +6,12 @@ from urllib.parse import urljoin
from requests import Session from requests import Session
from requests.adapters import HTTPAdapter from requests.adapters import HTTPAdapter
from requests.packages.urllib3.util.retry import Retry from requests.adapters import Retry
from svtplay_dl.utils.output import formatname from svtplay_dl.utils.output import formatname
from svtplay_dl.utils.parser import Options from svtplay_dl.utils.parser import Options
http.client._MAXHEADERS = 200
# Used for UA spoofing in get_http_data() # Used for UA spoofing in get_http_data()
FIREFOX_UA = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/112.0.0.0 Safari/537.36" FIREFOX_UA = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/112.0.0.0 Safari/537.36"