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 to get the "comment_count" in the meta ? #12808

Closed
liudatutu opened this issue Apr 21, 2017 · 2 comments
Closed

how to get the "comment_count" in the meta ? #12808

liudatutu opened this issue Apr 21, 2017 · 2 comments

Comments

@liudatutu
Copy link

@liudatutu liudatutu commented Apr 21, 2017

this is my code:

import youtube_dl
ydl_opts = {'forcetitle':'True','ignoreerrors':True,
'encoding':'utf-8','outtmpl':u'E:/Movie/%(title)s.%(ext)s'}
with youtube_dl.YoutubeDL(ydl_opts) as ydl:
meta = ydl.extract_info(
'https://www.youtube.com/watch?v=RGNTdUHN64Q', download=False)
print type(meta)
#print meta
print 'comment_count:',meta.get('comment_count','None')

[youtube] RGNTdUHN64Q: Downloading webpage
[youtube] RGNTdUHN64Q: Downloading video info webpage
[youtube] RGNTdUHN64Q: Extracting video information
WARNING: unable to extract uploader nickname
[youtube] RGNTdUHN64Q: Downloading MPD manifest
WARNING: "id" field is not a string - forcing string conversion
<type 'dict'>
comment_count: None

Process finished with exit code 0

@liudatutu
Copy link
Author

@liudatutu liudatutu commented Apr 21, 2017

hi hi hi,this question has been troubled me for many days........

@dstftw
Copy link
Collaborator

@dstftw dstftw commented Apr 21, 2017

comment_count is not extracted for YouTube.

@dstftw dstftw closed this Apr 21, 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
2 participants
You can’t perform that action at this time.