Skip to content

Instantly share code, notes, and snippets.

View abhitrueprogrammer's full-sized avatar
:octocat:

Abhinav Pant abhitrueprogrammer

:octocat:
View GitHub Profile
@ewpratten
ewpratten / hosts-yt-ads
Last active March 21, 2025 10:23
youtube ads hosts file
This project has been moved to a GitHub repository to allow Pull Requests.
See: https://github.com/Ewpratten/youtube_ad_blocklist
#!/usr/bin/env python3
import logging
import os
import re
import subprocess as sp
import sys
from argparse import ArgumentParser, ArgumentDefaultsHelpFormatter
from http.client import HTTPResponse
from tempfile import NamedTemporaryFile
import time
import csv
import random
from selenium import webdriver
from selenium.webdriver.chrome.service import Service
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
from selenium.common.exceptions import TimeoutException
from webdriver_manager.chrome import ChromeDriverManager