Closed LaticePrime closed 6 years ago
Instagram seems to work fine for me. Could you provide the concrete link, which you have tried to download? You didn't post the whole log output.
I heard something about an Instagram site change.. This might be the cause.
Usually, if I type youtube-dl
and a non-private username, youtube-dl will download all the videos for that user. This has worked for years . Since yesterday, it gets to page 1, then returns and http Error 404 user not found error. This is a very sudden bug as it has always worked for years. I tried below (with kim kardashian as an example):
''' Mac-mini:~$ youtube-dl --verbose http://www.instagram.com/kimkardashian/ [debug] System config: [] [debug] User config: [] [debug] Custom config: [] [debug] Command-line args: [u'--verbose', u'https://www.instagram.com/kimkardashian/'] [debug] Encodings: locale UTF-8, fs utf-8, out UTF-8, pref UTF-8 [debug] youtube-dl version 2017.11.06 [debug] Python version 2.7.10 - Darwin-17.2.0-x86_64-i386-64bit [debug] exe versions: ffmpeg 3.4, ffprobe 3.4 [debug] Proxy map: {} [instagram:user] kimkardashian: Downloading page 1 ERROR: Unable to download JSON metadata: HTTP Error 404: Not Found (caused by HTTPError()); please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type youtube-dl -U to update. Be sure to call youtube-dl with the --verbose flag and include its complete output. File "/usr/local/bin/youtube-dl/youtube_dl/extractor/common.py", line 506, in _request_webpage return self._downloader.urlopen(url_or_request) File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 2195, in urlopen return self._opener.open(req, timeout=self._socket_timeout) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 437, in open response = meth(req, response) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 550, in http_response 'http', request, response, code, msg, hdrs) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 469, in error result = self._call_chain(args) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 409, in _call_chain result = func(args) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 656, in http_error_302 return self.parent.open(new, timeout=req.timeout) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 437, in open response = meth(req, response) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 550, in http_response 'http', request, response, code, msg, hdrs) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 469, in error result = self._call_chain(args) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 409, in _call_chain result = func(args) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 656, in http_error_302 return self.parent.open(new, timeout=req.timeout) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 437, in open response = meth(req, response) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 550, in http_response 'http', request, response, code, msg, hdrs) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 475, in error return self._call_chain(args) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 409, in _call_chain result = func(args) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 558, in http_error_default raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
'''
It seems instagram dropped (or just currently broke?) support for public URLs in the form instagram.com/USERNAME/media
, used by the extractor.
See also recent comments at: https://stackoverflow.com/questions/35120738/why-does-instagram-com-user-media-give-the-json-for-that-users-feed https://stackoverflow.com/questions/17373886/how-can-i-get-a-users-media-from-instagram-without-authenticating-as-a-user/
See also recent comments at: ...
There is a solution proposed on the stackoverflow pages I linked above.
I've tested it in another project and it seems to work, though I'm not able to implement it for youtube-dl, sorry. Anyway, the changes required in /extractor/instagram.py
are:
http://instagram.com/USER/media
to http://instagram.com/USER/?__a=1
&max_id=ID
to the URL, where ID is the one of the last item in the current page, i.e. the JSON object user.media.nodes.id
(the JSON syntax has changed, the items
object doesn't exist anymore)Any chance of a fix for this in a future update? It has completely hamstrung pretty much everything I do on instagram.
Thanks for the fix! But, there's a problem when using the --write-pages
option: all the pages are saved with the same file name, so they get overwritten and I'm left only with the last page. The previous implementation correctly had unique file names by including a max_id=...
chunk in the name
Has this been fixed? Still not working for me.
How do I implement the fix? I've tried Youtube -U but still the same problem
Wait for the next release.
Please follow the guide below
x
into all the boxes [ ] relevant to your issue (like this:[x]
)Make sure you are using the latest version: run
youtube-dl --version
and ensure your version is 2017.11.06. If it's not, read this FAQ entry and update. Issues with outdated version will be rejected.Before submitting an issue make sure you have:
What is the purpose of your issue?
The following sections concretize particular purposed issues, you can erase any section (the contents between triple ---) not applicable to your issue
If the purpose of this issue is a bug report, site support request or you are not completely sure provide the full verbose output as follows:
Add the
-v
flag to your command line you run youtube-dl with (youtube-dl -v <your command line>
), copy the whole output and insert it here. It should look similar to one below (replace it with your log inserted between triple ```):If the purpose of this issue is a site support request please provide all kinds of example URLs support for which should be included (replace following example URLs by yours):
Note that youtube-dl does not support sites dedicated to copyright infringement. In order for site support request to be accepted all provided example URLs should not violate any copyrights.
Description of your issue, suggested solution and other information
Instagram suddenly not working. Http Error 404 on all downloads. SUDDEN: was working fine last night.