Fix error getting exit node ip if format urls are None
This commit is contained in:
parent
d5e661dfd3
commit
f1f77c4d77
@ -364,7 +364,7 @@ def _extract_formats(info, player_response):
|
|||||||
|
|
||||||
# get ip address
|
# get ip address
|
||||||
if info['formats']:
|
if info['formats']:
|
||||||
query_string = info['formats'][0].get('url', '?').split('?')[1]
|
query_string = (info['formats'][0].get('url') or '?').split('?')[1]
|
||||||
info['ip_address'] = deep_get(
|
info['ip_address'] = deep_get(
|
||||||
urllib.parse.parse_qs(query_string), 'ip', 0)
|
urllib.parse.parse_qs(query_string), 'ip', 0)
|
||||||
else:
|
else:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user