diff options
| author | 2022-02-14 17:17:07 -0500 | |
|---|---|---|
| committer | 2022-02-14 17:17:07 -0500 | |
| commit | 7900ee4e3692dbd8056c3e47c81bb22eda030b65 (patch) | |
| tree | 54d10ca35e4b8538d2c61470490642b660e2ae77 /gallery_dl/extractor/vk.py | |
| parent | 99bc014c924c755f10a4a930b1a83efabd84fde1 (diff) | |
New upstream version 1.20.5.upstream/1.20.5
Diffstat (limited to 'gallery_dl/extractor/vk.py')
| -rw-r--r-- | gallery_dl/extractor/vk.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/gallery_dl/extractor/vk.py b/gallery_dl/extractor/vk.py index ed565bc..dd2eb4e 100644 --- a/gallery_dl/extractor/vk.py +++ b/gallery_dl/extractor/vk.py @@ -34,7 +34,6 @@ class VkExtractor(Extractor): def _pagination(self, photos_url, user_id): sub = re.compile(r"/imp[fg]/").sub needle = 'data-id="{}_'.format(user_id) - cnt = 0 headers = { "X-Requested-With": "XMLHttpRequest", @@ -56,7 +55,9 @@ class VkExtractor(Extractor): offset = payload[0] html = payload[1] - for cnt, photo in enumerate(text.extract_iter(html, needle, ')')): + cnt = 0 + for photo in text.extract_iter(html, needle, ')'): + cnt += 1 pid = photo[:photo.find('"')] url = photo[photo.rindex("(")+1:] url = sub("/", url.partition("?")[0]) |
