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 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) |