Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
instagram - patch to deal with images with wrong "video" type #12284
Comments
|
|
Closing as no response for a long time. |
Make sure you are using the latest version: run
youtube-dl --versionand ensure your version is 2017.02.24.1. 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?
Description of your issue, suggested solution and other information
Sometimes an instagram profile contains an image which is wrongly described in the json data as having
type: video, instead oftype: image. (On the website these are displayed as images with a little square icon in the top-right corner, dunno what that means)When youtube-dl runs into one of these images, it aborts with the following error:
This happens because the "fake" video item is in fact an image, so it doesn't have the
videosjson element (which describes the available video formats and urls for the item).For a quick fix: add a check for existence of the
videoselement, see the attached patch for/extractor/instagram.py(This works for me, I'm not sure if other changes are needed/better, please review).
instagram.py.txt