Closed SamiSuleiman closed 1 year ago
This looks awesome! I never thought it is possible to obtain the view count solely from the client's browser. Could you explain how it is obtained? You can leave the comment below or in the PR description
@ynshung youtube only shows and hides the description element (where the views element is located) this means that the elements are available and can be queried just like normal elements (with the query selector).
so I just queried the hidden description element and got the views that way :)
I think we can present the number of views directly from the label instead of converting to integer since there might be issue on conversion for international users i.e. those that uses dot as separator. Assuming that YouTube automatically uses user's own localization to present the number. In this way we can avoid any potential conflict for other users
That's a good idea, I will commit the changes as soon as I get to my computer :)
thank you so much guys, I wanted this change so badly
this is how it looks: