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

How get get full output file name after downloading ? #8002

Closed
moiseyo opened this issue Dec 24, 2015 · 3 comments
Closed

How get get full output file name after downloading ? #8002

moiseyo opened this issue Dec 24, 2015 · 3 comments

Comments

@moiseyo
Copy link

@moiseyo moiseyo commented Dec 24, 2015

I'm trying to get file name after downloading
using version youtube_dl-2014.06.26-py2.7.egg\youtube_dl i could do it using code
filename = self.prepare_filename(info_dict)
self.filename=filename
and using version youtube_dl-2015.12.21-py2.7.egg the same code return only portion if full filename

Is any way to use generic code to get get full output file name after downloading

Thank you

@mohamed-aziz
Copy link

@mohamed-aziz mohamed-aziz commented Dec 25, 2015

a = youtube_dl.YoutubeDL()
a.prepare_filename({'id': '1234', 'ext':'mp4', 'title':'test'})
u'test-1234.mp4'

@moiseyo
Copy link
Author

@moiseyo moiseyo commented Dec 25, 2015

I tried

The results
my code :
ydl_opts['formats']= ['mp4','avi'] # does not filter extentions

file_name=ydl.prepare_filename({'id': out_dir, 'ext':'mp4', 'title':title})

result = ydl.extract_info(url , download=True)

Result 👍
filename :u'c:\temp\short\2\Louis CK - Restaurant Ordering Impression.mp4 #'
ydl.filename:u'c:\temp\short\2\Louis CK - Restaurant Ordering Impression.webm #'

Loaded file 👍
'c:\temp\short\2\Louis CK - Restaurant Ordering Impression.webm #.mkv # output File name does not match prepare name
url: 'https://www.youtube.com/watch?v=OPkZ7TjLO9k'

@yan12125
Copy link
Collaborator

@yan12125 yan12125 commented Nov 28, 2017

Looks like a duplicate of #5710. Please move on there for further discussion.

@yan12125 yan12125 closed this Nov 28, 2017
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
3 participants
You can’t perform that action at this time.