Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

fix: TypeError: argument of type int is not iterable

  • Loading branch information...
commit 83f915418eaa491831b92e483af32721d1f84767 1 parent 9a0b247
@baverman authored
Showing with 2 additions and 1 deletion.
  1. +2 −1  vk-get-video.py
View
3  vk-get-video.py
@@ -81,7 +81,8 @@ def get_url(url):
resp = opener.open('http://vk.com/al_video.php', urlencode(params))
match = re.search('var\svars\s=\s(\{.+?\})', resp.read())
data = literal_eval(match.group(1).decode('windows-1251').encode('utf-8').replace('\\"', '"'))
- if 'vkadre.ru' in data['host'] and not data['no_flv']:
+
+ if isinstance(data['host'], basestring) and 'vkadre.ru' in data['host'] and not data['no_flv']:
vurl = "http://{host}/assets/videos/{vtag}{vkid}.vk.flv".format(**data)
else:
res = HD_RES[data.get('hd', 1)]
Please sign in to comment.
Something went wrong with that request. Please try again.