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

Generic Extractor should add short-hash of URL to filename #23191

Open
d3fault opened this issue Nov 24, 2019 · 0 comments
Open

Generic Extractor should add short-hash of URL to filename #23191

d3fault opened this issue Nov 24, 2019 · 0 comments

Comments

@d3fault
Copy link

@d3fault d3fault commented Nov 24, 2019

Checklist

  • I'm reporting a broken site support issue
  • I've verified that I'm running youtube-dl version 2019.11.22
  • I've checked that all provided URLs are alive and playable in a browser
  • I've checked that all URLs and arguments with special characters are properly quoted or escaped
  • I've searched the bugtracker for similar bug reports including closed ones
  • I've read bugs section in FAQ

Verbose log

n/a

Description

Currently the generic extractor relies on the HTML Title and the last portion of the URL to generate a filename.

Ex:
youtube-dl https://www.w3.org/2010/05/video/mediaevents.html
gets you a file named:
HTML5 Video-mediaevents.mp4

This strategy could easily give filename collisions which result in an erroneous response of "this file has already been downloaded". The filename generated should contain a shorthash (first 8 characters of sha1) of the entire URL, or something similar.

Ex of what the filename should be:
HTML5 Video-mediaevents-fbea3c2c.mp4

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

Successfully merging a pull request may close this issue.

None yet
1 participant
You can’t perform that action at this time.