Skip to content

Get video info even if no likes/dislikes exist#288

Merged
ritiek merged 1 commit intomps-youtube:developfrom
noembryo:develop
Jul 17, 2021
Merged

Get video info even if no likes/dislikes exist#288
ritiek merged 1 commit intomps-youtube:developfrom
noembryo:develop

Conversation

@noembryo
Copy link
Contributor

If no likes/dislikes exist we get 0 not KeyError..

@mts7 mts7 mentioned this pull request Mar 29, 2021
@romainjouin
Copy link

I propose to change the lines 53 and 54 of file * backend_youtube_dl.py * to :

self._likes = self._ydl_info.get('like_count',0)
self._dislikes = self._ydl_info.get('dislike_count',0)

@noembryo
Copy link
Contributor Author

noembryo commented Apr 3, 2021

This is exactly what this PR is doing... 😉

@hanngocduong97
Copy link

Good day, I have the same problem so can you merge this branch thank you!

@Coddo-Python
Copy link

Has the PR been merged yet?

@bubblefoil
Copy link

Has the PR been merged yet?

image

Apparently, we don't have the power and those who do don't care 🤷
I don't even know how to find a person with write access.

@ritiek
Copy link
Member

ritiek commented Jul 17, 2021

Looks good to me, thanks! By the way, I encourage all of you guys to check out pytube and see if it fits your needs, since it's more actively maintained.

Really sorry I couldn't get this to merge earlier since I'm not actively working on pafy any more (and it seems like other maintainers have gone busy too). :(

@ritiek ritiek merged commit 0580c72 into mps-youtube:develop Jul 17, 2021
@Coddo-Python
Copy link

But ritiek, pafy is like WAYYYYY faster than pytube as ytdl, I have done tests, pafy was faster 100% of the time

@Rutvik552k
Copy link

Rutvik552k commented Feb 3, 2023

I have made changes as per the suggestion of @romainjouin in backend_youtube_dl.py file. although i am facing keyerror "Like count". Could anyone help me to resolve this?

Ans. I just comment out those both line and my code works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

10 participants