This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
""" | |
Twitch highlight mirror – resilient, resumable, and verbose-friendly. | |
* Reads a plain-text file (one .m3u8 URL per line) passed on the command line. | |
* Creates a `downloads/<playlist-name>` directory for each list. | |
* Saves the original `.m3u8` file beside its segments for reference. | |
* Downloads every `.ts` segment. | |
* **HTTP 403 → skip immediately** (segment really is gone). | |
* **Timeouts / transient errors → retry up to 3×** with exponential back-off. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import sys | |
import re | |
def main(): | |
if len(sys.argv) < 2: | |
print("Usage: generate_askfm_assets.py filename1 [filename2 ...]") | |
sys.exit(1) | |
input_filenames = sys.argv[1:] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import sys | |
import argparse | |
def generate_urls(low_id, high_id, v2=False): | |
if low_id > high_id: | |
print("Error: low_id must be less than or equal to high_id.") | |
sys.exit(1) | |
for id_num in range(low_id, high_id + 1): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import argparse | |
from playwright.sync_api import sync_playwright, TimeoutError as PlaywrightTimeoutError | |
import time | |
import sys | |
def scrape_veoh_videos(category, output_file, min_page=1, max_page=None, length_filter='all', reverse=False, language=None, subtitle=None, sort='recent', log_file=None): | |
video_ids = set() | |
total_videos_found = 0 | |
# Function to handle logging |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import ast | |
import json | |
from datetime import datetime | |
import subprocess | |
user_tuples = [] | |
# Load user_tuples from the file | |
with open('legacy_verified_usernames.txt', 'r') as file: | |
data = file.read() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import csv | |
import requests | |
import re | |
import sys | |
import glob | |
from urllib.parse import urlsplit | |
from time import sleep | |
def expand_url(short_url): | |
try: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
idDict = {} | |
allCountryCodes = set() | |
with open("appStoreLinks.txt") as linkFile: | |
for text in linkFile: | |
#print(text) | |
splitText = text.split('/') | |
countryCode = splitText[3] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from itunes_app_scraper.scraper import AppStoreScraper | |
from itunes_app_scraper.scraper import AppStoreCollections | |
import sys | |
import time | |
countryCode = "kr" | |
scraper = AppStoreScraper() | |
unprocessedAppIds = set() # identified but not queried ids kept here |