Comments (9)
Can you give me a sample file? I will write a function to import those settings.
from blocktube.
Thanks for responding.
Video Blocker (3081 keys 5-4-2019 part 8 of 8).json.txt
Hopefully I have attached correctly. Github is not allowing ".json" files. So, I have renamed it to ".json.txt"
It is basically a file of key-value pairs, where key is the name of the channel to be blocked (and the value is "channel"), or the keyword to be blocked (and the value is "keyword"). Wildcards are also accepted.
Settings from multiple such files is accepted. The data is added to the current settings (current settings are not replaced).
from blocktube.
I am wondering where should the keyword type go? We can create an import setting that would block all the channels given in the import and specify the format of the json.
I think this would be a question for the author -> What should be the standard format of the json?
type: [channels, channel_id, video_id, video] and there would be a corresponding key.
Something like this.... The 'keyword' type should be manually replaced with video title to keep it generic.
{"key":"പാഞ്ചജന്യം","type":"channel"},{"key":"Cinema Company","type":"channel"},{"key":"Asia Live TV","type":"channel"},{"key":"Scene Contra","type":"channel"},{"key":"മമ്മൂട്ടി","type":"keyword"}
from blocktube.
Sorry, I noticed there is already an import feature. I think the best idea would be to read the json that you have and save it in a different format. Then import that json
from blocktube.
From the above comments I have a few questions:
(1) What is the import Json format expected by Blocktube? Probably a python script can convert between the formats.
(2) I am sorry that I didn't understand what the meaning is when you said "The 'keyword' type should be manually replaced with video title". What that setting does is that, if the title contains the corresponding keyword (inside the title), it will be blocked.
It will be more user-friendly if this extension is able to import the settings (and internally change the JSON format, as needed), so that switching between the extensions is easy. I am thinking of switching to the FOSS extension Blocktube, since "Video Blocker" is too resource hungry and proprietary.
from blocktube.
@shivamriky @Jayadevan-Vijayan
This is the format the extension expects to receive with the import option
{"filterData":{"channelId":["UC295-Dw_tDNtZXFeAPAW6Aw"],"channelName":["KeywordInChannelNameToBlock"],"comment":["KeywordInCommentToBlock"],"title":["KeywordInTitleToBlock"],"vidLength":[22,3333],"videoId":["hTIQz633_9w"]},"options":{"autoplay":true,"block_message":"Blocked","mixes":true,"trending":true},"uiPass":"111"}
I don't have much free time atm to continue developing new features for this extension, I only do bugfixes for now, but I will accept a pull requests that will improve it like adding support for importing "Video blocker" backups
from blocktube.
Thanks. I don't know what the etiquette of github is, so I don't know whether this issue should be left open or closed. Thanks for the response. :)
from blocktube.
@amitbl
Could you help me to understand how are you filtering the content using the js?
What I have understood so far is that you are trying to filter out the content using SPF filters which will probably either prevent the response from being displayed on the webpage. I am not sure exactly how all of this is happening.
If you can name the technologies I need to understand that would be great.
Regards,
Shivam Rastogi
from blocktube.
spfjs is what youtube's using to execute XHR requests (https://github.com/youtube/spfjs)
But You don't need to know it or any other special technologies, only basic vanilla Javascript.
The addon at it's core is very basic and consists pretty much of two stages
- Registering a function hook for spfjs, this allows to modify JSON received from youtube servers before it actually hit any another youtube js code.
- In that function hook, recursively parse received responses and filter out results defined by the user
Here are the functions to start from:
Registering hook for spfjs:
- https://github.com/amitbl/blocktube/blob/master/src/scripts/seed.js#L221-L229
- https://github.com/amitbl/blocktube/blob/master/src/scripts/seed.js#L136-L158
Implementation of the hooking function
Recursive object filtering function
from blocktube.
Related Issues (20)
- Small(?) suggestion?: Don't suggest videos that have been viewed less than e.g. 1000 times HOT 1
- dont want to see some words in comments , but i still see that word , its not blocked HOT 1
- "Disable YouTube's audio loudness normalization" does not work.
- [Feature Request] Exclude search page blocking HOT 2
- [Feature Request] Hide blocked videos for better cross platform experience
- [Feature Request] Thoroughly comment the objectType's for videos
- Channel name block issue
- Return false having no effect
- [Feature Request] Set Blocktube to only apply to search HOT 1
- [Feature Request] Block Channels with less than x subscribers HOT 3
- Firefox now supports add-ons for android
- [Feature Request] Block videos with disabled comments
- [Feature Request] Allow videos when viewing a playlist or searching HOT 3
- [Feature request] block videos/shorts with ai (altered or synthetic content) label
- Ad blocker conflict causes blocktube to fail
- [Feature Request] Allow Advanced Blocking to be run before basic rules
- Option to disable blocking of videos uploaded by official artist channels (music channels)
- [Feature request] Block 'Members-only content'
- [Alternative extension] A possible alternative to Blocktube HOT 2
- Advanced Blocking Breaks Conflicts with Ublock Origin Adblock
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from blocktube.