Python downloader.Downloader() Examples

The following are 5 code examples of downloader.Downloader(). You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may also want to check out all available functions/classes of the module downloader , or try the search function .
Example #1
Source File: WebDriver.py    From Web-Driver-Toolkit with MIT License 6 votes vote down vote up
def __init__(self):

        # Check the OS first
        if not str(sys.platform) == "darwin":
            self.u.head("Incompatible System")
            print(" ")
            print("This script can only be run from macOS/OS X.")
            print(" ")
            print("The current running system is \"{}\".".format(sys.platform))
            print(" ")
            self.grab("Press [enter] to quit...")
            print(" ")
            exit(1)

        self.dl = downloader.Downloader()
        self.r  = run.Run()
        self.u  = utils.Utils()
        self.web_drivers = None
        self.os_build_number = None
        self.os_number = None
        self.wd_loc = None
        self.sip_checked = False
        self.installed_version = "Not Installed!"
        self.get_manifest()
        self.get_system_info() 
Example #2
Source File: main.py    From hls-downloader with MIT License 6 votes vote down vote up
def main(url_to_m3u8, download_dir, verbose, ignore_ssl):
    """
    :type url_to_m3u8: str
    :type download_dir: str
    :type verbose: bool
    :type ignore_ssl: bool
    :rtype: None
    """
    http_settings = dict(
        headers={
            "User-Agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6)"
            " AppleWebKit/602.4.8 (KHTML, like Gecko)"
            " Version/10.0.3 Safari/602.4.8"
        },
    )
    if ignore_ssl:
        http_settings["verify"] = False

    global DOWNLOADER
    DOWNLOADER = downloader.Downloader(download_dir=download_dir, http_settings=http_settings,)
    logging.basicConfig(level=logging.INFO if verbose else logging.WARNING)

    process_main_playlist(url_to_m3u8) 
Example #3
Source File: dsdt.py    From SSDTTime with MIT License 5 votes vote down vote up
def __init__(self, **kwargs):
        self.dl = downloader.Downloader()
        self.r  = run.Run()
        self.u    = utils.Utils("SSDT Time")
        self.iasl_url_macOS = "https://bitbucket.org/RehabMan/acpica/downloads/iasl.zip"
        self.iasl_url_linux = "http://amdosx.kellynet.nl/iasl.zip"
        self.iasl_url_windows = "https://acpica.org/sites/acpica/files/iasl-win-20200528.zip"
        self.iasl = self.check_iasl()
        if not self.iasl:
            raise Exception("Could not locate or download iasl!")
        self.dsdt       = None
        self.dsdt_raw   = None
        self.dsdt_lines = None 
Example #4
Source File: api.py    From hae with MIT License 5 votes vote down vote up
def createDownloader(self, url, filename = None, resume = False):
		return Downloader(self.window, url, filename, resume)

	# 子进程 
Example #5
Source File: main.py    From filmkodi with Apache License 2.0 5 votes vote down vote up
def downloadVideo(self, url, title):
        common.log('Trying to download video ' + str(url))

        # check url
        if url.startswith('plugin'):
            common.log('Video is not downloadable')
            return None

        path = common.getSetting('download_path')
        if not path:
            path = common.browseFolders(common.translate(30017))
            common.setSetting('download_path', path)

        title = getKeyboard(default = fu.cleanFilename(title),heading='SportsDevil')
        if title == None or title == '':
            return None

        downloader = Downloader()
        downloaded_file = downloader.downloadMovie(url, path,  fu.cleanFilename(title), '.flv')

        if downloaded_file == None:
            common.log ('Download cancelled')
        else:
            common.log('Video ' + url + " downloaded to '" + downloaded_file + "'")

        return downloaded_file