Skip to content

Instantly share code, notes, and snippets.

View Preyansh91's full-sized avatar

Preyansh Shah Preyansh91

View GitHub Profile
@Preyansh91
Preyansh91 / http_directory.py
Created February 16, 2018 01:13 — forked from remram44/http_directory.py
Recursively download a directory with Python
from HTMLParser import HTMLParser
import urllib2
import os
import re
re_url = re.compile(r'^(([a-zA-Z_-]+)://([^/]+))(/.*)?$')
def resolve_link(link, url):
m = re_url.match(link)