{"id":15148324,"url":"https://github.com/foae/pihole-youtube-block","last_synced_at":"2025-09-29T17:31:50.112Z","repository":{"id":87905021,"uuid":"159321221","full_name":"foae/pihole-youtube-block","owner":"foae","description":"Scan pihole logs and block YouTube ads domains","archived":true,"fork":false,"pushed_at":"2019-09-29T10:31:32.000Z","size":32281,"stargazers_count":65,"open_issues_count":0,"forks_count":7,"subscribers_count":7,"default_branch":"master","last_synced_at":"2024-09-22T19:32:32.504Z","etag":null,"topics":["pihole","pihole-ads-list","pihole-blocklists","pihole-youtube-ads","youtube-ads","youtube-blocker"],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/foae.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-11-27T10:56:49.000Z","updated_at":"2024-02-23T19:43:22.000Z","dependencies_parsed_at":null,"dependency_job_id":"d83ea93f-94af-466b-aade-a06320d2e863","html_url":"https://github.com/foae/pihole-youtube-block","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/foae%2Fpihole-youtube-block","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/foae%2Fpihole-youtube-block/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/foae%2Fpihole-youtube-block/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/foae%2Fpihole-youtube-block/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/foae","download_url":"https://codeload.github.com/foae/pihole-youtube-block/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":219874649,"owners_count":16554606,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["pihole","pihole-ads-list","pihole-blocklists","pihole-youtube-ads","youtube-ads","youtube-blocker"],"created_at":"2024-09-26T13:02:52.353Z","updated_at":"2025-09-29T17:31:47.531Z","avatar_url":"https://github.com/foae.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"### Warning: it might block YouTube completely.\nAds are served through the same domains as normal video clips. Until I find a better solution, please be mindful of this issue and consider this as experimental.\n\n# pihole-youtube-block\n#### Scans logs generated by `pihole` and extracts domains used to serve ads on YouTube \n\n* scans log files, including archived logs\n* can process multiple files in parallel\n* compiles a unique list with the extracted domains\n* offers the option to add (blacklist) the extracted domains directly to `pihole`\n* low memory footprint and extremely fast\n* no dependencies\n* you don't need to install anything (check `bin` folder)\n\n##### Getting started\n```bash\n$ git clone https://github.com/foae/pihole-youtube-block.git\n$ cd pihole-youtube-block\n```\n\n##### How to run if you have `go` installed\n```bash\n$ go run main.go\n```\n\n##### How to run it without having `go` installed\n###### For ARM (Raspberry Pi and alternatives)\n```bash\n$ cd bin\n$ ./ytblock-rpi\n```\n\n###### For all others\n```bash\n$ cd bin\n$ ./ytblock\n```\n\nAll gathered domains will be written to `compiled_domains.txt`  \nYou can easily tweak the configuration; it has sensible defaults.\n \nFile `config.json`\n* `\"PIHOLE_LOGS_DIR\": \"/var/log/\",` – path to your pihole logs\n* `\"COMPILED_FILE_NAME\": \"./compiled_domains.txt\",` – name of the file used to collect all domains from logs\n* `\"LOG_FILE_NAME_PREFIX\": \"pihole.log\"` – if your pihole log files bear a different name, change this with the common prefix of your log files that you want scanned\n* `\"POP_CONFIRMATION_DIALOGUE\": true` – change to `false` to skip the confirmation dialogue and send the found domains directly to pihole without asking. Useful for scripting.\n\n##### Example output\n```bash\nblana@raspberrypi:~/pihole-youtube-block/bin $ ./ytblock-rpi \n\u003e\u003e\u003e Waiting for all jobs to finish...\n2018/11/30 19:19:14 Finished processing file (/var/log/pihole.log) in (1.964928163s).\n2018/11/30 19:19:16 Finished processing file (/var/log/pihole.log.1) in (3.518280066s).\n2018/11/30 19:19:18 Finished processing file (/var/log/pihole.log.2.gz) in (5.431282712s).\n\u003e\u003e\u003e Done: (125) unique extracted domains written to (./compiled_domains.txt) in (5.48431123s)\n-----------\nWould you like to stick those (125) collected domains into *your* pihole? (y/n)\n-----------\nn\n2018/11/30 19:19:20 No is a no. Bye.\n```\n\n##### License\nMIT License","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffoae%2Fpihole-youtube-block","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffoae%2Fpihole-youtube-block","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffoae%2Fpihole-youtube-block/lists"}