Skip to content

Instantly share code, notes, and snippets.

@zone559
zone559 / http.py
Created March 12, 2026 01:24
HTTP downloader with session header preservation and resume bug fixes. Now preserves existing session headers (cookies, auth, browser fingerprints) instead of overwriting them. Fixed variable scope issue in partial download resume functionality.
# -*- coding: utf-8 -*-
# Copyright 2014-2026 Mike Fährmann
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
# published by the Free Software Foundation.
"""Downloader module for http:// and https:// URLs"""
import re
import requests
import os
from urllib.parse import urlparse
def extract_video_url(html_content):
"""
Extract video URL from HTML content using regex
"""
pattern = r'<meta property="og:video" content="(https?://[^"]+\.mp4)"'
import requests
import re
from urllib.parse import urljoin
def is_user_profile(url):
"""Check if the URL is a user profile"""
try:
response = requests.get(url)
response.raise_for_status()
"use strict";
(self.__LOADABLE_LOADED_CHUNKS__ = self.__LOADABLE_LOADED_CHUNKS__ || []).push([[3739], {
13739: (t, e, s) => {
s.d(e, {
Q1: () => v,
TX: () => d,
ko: () => l,
tJ: () => c,
zu: () => u
});
@zone559
zone559 / tungsten.py
Last active August 18, 2025 22:52
tungsten.run downloader
import requests
import re
import os
import sys
from pathlib import Path
from urllib.parse import urlparse
from datetime import datetime
def get_model_name_from_url(session, url):
try:
@zone559
zone559 / snapchat.py
Created August 14, 2025 21:31
for gallery-dl
# -*- coding: utf-8 -*-
# Copyright 2023 YourName
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
# published by the Free Software Foundation.
"""Extractor for https://www.snapchat.com/"""
import requests
import os
import re
import time
from urllib.parse import urlparse
def get_user_id_from_url(url):
"""Extract user ID from profile URL"""
# Try to find ID in path
match = re.search(r'/(\d+)/', url)
@zone559
zone559 / vscohttp.py
Last active August 9, 2025 02:19
httpx to vsco test
import requests
import ssl
from requests.adapters import HTTPAdapter
class CustomSSLAdapter(HTTPAdapter):
def init_poolmanager(self, *args, **kwargs):
context = ssl.create_default_context()
context.check_hostname = False
context.verify_mode = ssl.CERT_NONE
kwargs['ssl_context'] = context
import base64
import re
def decode_url(encoded_str):
# Remove the last 2 characters
encoded_str = encoded_str[:-2]
# Split into characters, reverse, and join back
reversed_str = ''.join(reversed(list(encoded_str)))
# Base64 decode
return base64.b64decode(reversed_str)
import requests
import json
import time
base_url = "https://leakedzone.com/voulezj"
page = 1
empty_response_count = 0 # To prevent infinite loops
max_empty_responses = 3 # Stop after this many empty responses
headers = {