mirror of
https://gitlab.com/RemixDev/deemix-py.git
synced 2024-12-28 18:46:13 +00:00
Set a timeout and use session connection pool for getting file sizes
This commit is contained in:
parent
48f6026c75
commit
04eb63b4cd
|
@ -81,7 +81,9 @@ class Deezer:
|
||||||
|
|
||||||
def get_track_filesizes(self, sng_id):
|
def get_track_filesizes(self, sng_id):
|
||||||
try:
|
try:
|
||||||
response = requests.post("https://www.deezer.com/", headers=self.http_headers)
|
response = requests.post("https://www.deezer.com/",
|
||||||
|
headers=self.http_headers,
|
||||||
|
timeout=30)
|
||||||
guest_sid = response.cookies.get('sid')
|
guest_sid = response.cookies.get('sid')
|
||||||
site = requests.post(
|
site = requests.post(
|
||||||
"https://api.deezer.com/1.0/gateway.php",
|
"https://api.deezer.com/1.0/gateway.php",
|
||||||
|
|
Loading…
Reference in a new issue