philbot9 / youtube-info

Fetch meta information about YouTube videos
ISC License
43 stars 20 forks source link

Add like and dislike count #3

Closed richja closed 6 years ago

richja commented 6 years ago

To resolve #2 my first PR, hope that's ok

philbot9 commented 6 years ago

Hi there, Thank you for the Pull Request. Looks good, just a couple small things:

  1. The CSS selectors each match two buttons. For both likes and dislikes, there is a "clicked" and an "unclicked" button (one of which is hidden). If you change the CSS class for the buttons to like-button-renderer-dislike-button-unclicked and like-button-renderer-like-button-unclicked respectively it should be fine.

  2. Use the .text() method instead of .html() so the result is in plain text and we don't get bit by potential HTML entities.

Cheers

richja commented 6 years ago

Good points, Philip, edited. Cheers.

philbot9 commented 6 years ago

Great, thank you!