1
0
mirror of https://github.com/spaam/svtplay-dl.git synced 2024-11-27 21:54:17 +01:00

select_quality: this should be get and not pop

This commit is contained in:
Johan Andersson 2018-03-10 10:09:26 +01:00
parent aff4a0716a
commit fbb511981e

View File

@ -180,7 +180,7 @@ def select_quality(options, streams):
http = HTTP(options) http = HTTP(options)
# Test if the wanted stream is available. If not try with the second best and so on. # Test if the wanted stream is available. If not try with the second best and so on.
for w in wanted: for w in wanted:
res = http.get(stream_hash[w].url, cookies=stream_hash[w].kwargs.pop("cookies", None)) res = http.get(stream_hash[w].url, cookies=stream_hash[w].kwargs.get("cookies", None))
if res is not None and res.status_code < 404: if res is not None and res.status_code < 404:
return stream_hash[w] return stream_hash[w]