amitbl / blocktube

YouTube™ content blocker
GNU General Public License v3.0
907 stars 64 forks source link

[Feature request] More allow only videos #26

Open ambrosemacgyv opened 5 years ago

ambrosemacgyv commented 5 years ago

Hi,

An example would be only allow if less than x views, or a range between x and y. Another example would be only allow if matches 1080p.

I would be nice to choose a specific value, say allow only if less than 500 views. Or even better a range, allowing only between 1.5k views and 10k.

I also would like an option to only allow videos if they match 1080p option in search results.

Thanks!

ambrosemacgyv commented 5 years ago

I looked through the code an I'm having difficulty finding where blocktube scrapes the data from. Is it possible to find the view count and video quality?

amitbl commented 5 years ago

@ambrosemacgyv Data being scraped from XHR requests ending with &pbj=1 and these URLs

'/browse_ajax,
'/related_ajax'
'/service_ajax'
'/list_ajax'
'/guide_ajax'
'/live_chat/get_live_chat'

View count I believe is possible to get in most requests but video quality won't be possible to detect, only on the video page itself

Capripede commented 5 years ago

Could you add view count blocking as a feature? I can't figure out where and what files to edit to make this possible.

Thank you

Capripede commented 5 years ago

I currently use uBlock origin to kind of block videos with more than 1k views. However, modify the JSON before rendering would be much more faster.

chirag127 commented 2 years ago

currently use uBlock origin to kind of block videos with more than 1k views

how?