Juvenal-Yescas / mediafire-dl

Simple command-line script to download files from mediafire based on gdown
MIT License
151 stars 35 forks source link

Missing "https://" match #1

Closed RooTender closed 3 years ago

RooTender commented 4 years ago

extractDownloadLink is a function that seeks for link, which begins on http://. Lately many of these links begins on https://. It's a good idea to add OR function to regex match, just for a quick fix:

previously:

def extractDownloadLink(contents):
    for line in contents.splitlines():
        m = re.search(r'href="(http://download[^"]+)', line)

updated:

def extractDownloadLink(contents):
    for line in contents.splitlines():
        m = re.search(r'href="((http|https)://download[^"]+)', line)
Juvenal-Yescas commented 3 years ago

Thanks, I'll add it @RooTender