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

Incorrect file name if 'title' contains '.' #2186

Closed
leesei opened this issue Jan 21, 2014 · 2 comments
Closed

Incorrect file name if 'title' contains '.' #2186

leesei opened this issue Jan 21, 2014 · 2 comments

Comments

@leesei
Copy link

@leesei leesei commented Jan 21, 2014

$ youtube-dl.py -v --skip-download --write-info-json -o "%(autonumber)s-[%(title)s]-[%(id)s]" http://www.youtube.com/watch?v=Z616jiybr1E
[debug] System config: []
[debug] User config: []
[debug] Command-line args: ['-vvv', '--skip-download', '--write-info-json', '-o', '%(autonumber)s-[%(title)s]-[%(id)s]', 'http://www.youtube.com/watch?v=Z616jiybr1E']
[debug] Encodings: locale 'UTF-8', fs 'UTF-8', out 'UTF-8', pref: 'UTF-8'
[debug] youtube-dl version 2014.01.20
[debug] Python version 2.7.5+ - Linux-3.10-2-amd64-x86_64-with-LinuxMint-1-debian
[debug] Proxy map: {}
[youtube] Setting language
[youtube] Z616jiybr1E: Downloading webpage
[youtube] Z616jiybr1E: Downloading video info webpage
[youtube] Z616jiybr1E: Extracting video information
[info] Writing video description metadata as JSON to: 00001-[SQL_Server_GroupBy_vs.info.json

Dumped to: 00001-[SQL_Server_GroupBy_vs.info.json
Expected: 00001-[SQL_Server_GroupBy_vs._MongoDB_MapReduce_Part_2_of_2]-[Z616jiybr1E].json

@jaimeMF
Copy link
Collaborator

@jaimeMF jaimeMF commented Jan 21, 2014

Using -o "%(autonumber)s-%(title)s-[%(id)s].%(ext)s" will write the info to 00001-SQL_Server_GroupBy_vs._MongoDB_MapReduce_Part_2_of_2-[Z616jiybr1E].info.json.
The problem is that we try to drop the extension from the file before adding info.json (foo.mp4 becomes foo.info.json). With the template you used, we identify _MongoDB_MapReduce_Part_2_of_2-[Z616jiybr1E] as the extension, that's why it's removed.
In general you should give an explicit extension in the output template or use .%(ext)s.

@leesei
Copy link
Author

@leesei leesei commented Jan 22, 2014

Thanks for pointing that out.

@leesei leesei closed this Jan 22, 2014
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
2 participants
You can’t perform that action at this time.