[instagram:user] Fix extraction (fixes #9059)
authorJaime Marquínez Ferrándiz <jaime.marquinez.ferrandiz@gmail.com>
Sat, 2 Apr 2016 16:01:58 +0000 (18:01 +0200)
committerJaime Marquínez Ferrándiz <jaime.marquinez.ferrandiz@gmail.com>
Sat, 2 Apr 2016 16:03:56 +0000 (18:03 +0200)
The URL for the next page was incorrect and we always got the same page, therefore it got trapped in an infinite loop.

youtube_dl/extractor/instagram.py

index 4e62098b05fa1ec753f240adc5a27b7da57e2e95..11bb58d8a66edfc6ae06adb3d7e0d692262d757d 100644 (file)
@@ -152,7 +152,7 @@ class InstagramUserIE(InfoExtractor):
 
             if not page['items']:
                 break
-            max_id = page['items'][-1]['id']
+            max_id = page['items'][-1]['id'].split('_')[0]
             media_url = (
                 'http://instagram.com/%s/media?max_id=%s' % (
                     uploader_id, max_id))