Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Imgur URL causes endless loop #11071

Closed
4 of 8 tasks
gulkily opened this issue Oct 30, 2016 · 3 comments
Closed
4 of 8 tasks

Imgur URL causes endless loop #11071

gulkily opened this issue Oct 30, 2016 · 3 comments

Comments

@gulkily
Copy link

gulkily commented Oct 30, 2016

Please follow the guide below

  • You will be asked some questions and requested to provide some information, please read them carefully and answer honestly
  • Put an x into all the boxes [ ] relevant to your issue (like that [x])
  • Use Preview tab to see how your issue will actually look like

Make sure you are using the latest version: run youtube-dl --version and ensure your version is 2016.10.26. If it's not read this FAQ entry and update. Issues with outdated version will be rejected.

  • I've verified and I assure that I'm running youtube-dl 2016.10.26

Before submitting an issue make sure you have:

  • At least skimmed through README and most notably FAQ and BUGS sections
  • Searched the bugtracker for similar issues including closed ones

What is the purpose of your issue?

  • Bug report (encountered problems with youtube-dl)
  • Site support request (request for adding support for a new site)
  • Feature request (request for a new functionality)
  • Question
  • Other

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 -v flag to your command line you run youtube-dl with, copy the whole output and insert it here. It should look similar to one below (replace it with your log inserted between triple ```):

$ youtube-dl http://imgur.com/r/aww/VQcQPhM
[generic] VQcQPhM: Requesting header
WARNING: Falling back on generic information extractor.
[generic] VQcQPhM: Downloading webpage
[generic] VQcQPhM: Extracting information
[generic] VQcQPhM: Requesting header
WARNING: Falling back on generic information extractor.
[generic] VQcQPhM: Downloading webpage
[generic] VQcQPhM: Extracting information
[generic] VQcQPhM: Requesting header
WARNING: Falling back on generic information extractor.
[generic] VQcQPhM: Downloading webpage
[generic] VQcQPhM: Extracting information
[generic] VQcQPhM: Requesting header
WARNING: Falling back on generic information extractor.
[generic] VQcQPhM: Downloading webpage
[generic] VQcQPhM: Extracting information
[generic] VQcQPhM: Requesting header
WARNING: Falling back on generic information extractor.
[generic] VQcQPhM: Downloading webpage
[generic] VQcQPhM: Extracting information
[generic] VQcQPhM: Requesting header
WARNING: Falling back on generic information extractor.
[generic] VQcQPhM: Downloading webpage
[generic] VQcQPhM: Extracting information
[generic] VQcQPhM: Requesting header
WARNING: Falling back on generic information extractor.
[generic] VQcQPhM: Downloading webpage
[generic] VQcQPhM: Extracting information
[generic] VQcQPhM: Requesting header
WARNING: Falling back on generic information extractor.
[generic] VQcQPhM: Downloading webpage
[generic] VQcQPhM: Extracting information
[generic] VQcQPhM: Requesting header
WARNING: Falling back on generic information extractor.
[generic] VQcQPhM: Downloading webpage
[generic] VQcQPhM: Extracting information
[generic] VQcQPhM: Requesting header
WARNING: Falling back on generic information extractor.
[generic] VQcQPhM: Downloading webpage
^C
ERROR: Interrupted by user

 youtube-dl http://imgur.com/VQcQPhM
[Imgur] VQcQPhM: Downloading webpage
[download] The boss is here-VQcQPhM.mp4 has already been downloaded
[download] 100% of 684.66KiB
<end of log>

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):


Description of your issue, suggested solution and other information

When I try to download this imgur link in the /r/foo/hash format, youtube-dl seems to go into an endless loop. When I get rid of the /r/aww/ part of the URL, it works fine. Other imgur.com links are working fine.

@Hrxn
Copy link

Hrxn commented Oct 30, 2016

Avoid imgur URLs with the /r/ part?

As you already know, the hash or id is the important part of the URL.

But yeah, this can be fixed by stripping out the /r/<xzy> part automatically.

Don't know what you're trying to do, but you can also do this with a text editor, for example.

Edit:

Okay, one little problem here. If the post is an album, the format imgur.com/<xyz> doesn't work.
Only imgur.com/a/<xyz> instead, for example.

Not sure if that is always the case, I am not really familiar with Imgur, but if the hash/ID has a length of 5 characters, it is an album, and if it's 7, a single post.

@Hrxn
Copy link

Hrxn commented Oct 30, 2016

Okay, I hacked together a bit of JavaScript, you can run it in you browser's dev console (Ctrl+Shift+I or Ctrl+Shift+J (Chomium) or Ctrl+Shift+K (Firefox))

// Select (container) elements
var a = document.querySelectorAll('div.post');
var cat = document.querySelectorAll('link')[8].getAttribute('href').replace(/http(s?).*\//, "");
var sst = "/r/" + cat + "/"
// Callback funtion for array loop
function getPostUrl(e, i, a) {
  var n = a[i];
  var c = n.getElementsByClassName('image-list-link');
  var o = c[0].getAttribute('href');
  var s = o.replace(sst, "")
  if (s.length === 5)
    console.log("https://imgur.com/a/" + s);
  if (s.length === 7)
    console.log("https://imgur.com/" + s);
}
// Iterate found elements
a.forEach(getPostUrl);

These URLs should work with youtube-dl..
Although youtube-dl ignores images, as far as I know, for obvious reasons 😄

@yan12125
Copy link
Collaborator

Thanks for the report. /r/ URLs will be recognized in the next version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants