當前位置: 首頁>>代碼示例>>Python>>正文


Python downloader.Downloader方法代碼示例

本文整理匯總了Python中downloader.Downloader方法的典型用法代碼示例。如果您正苦於以下問題:Python downloader.Downloader方法的具體用法?Python downloader.Downloader怎麽用?Python downloader.Downloader使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在downloader的用法示例。


在下文中一共展示了downloader.Downloader方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: __init__

# 需要導入模塊: import downloader [as 別名]
# 或者: from downloader import Downloader [as 別名]
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() 
開發者ID:corpnewt,項目名稱:Web-Driver-Toolkit,代碼行數:27,代碼來源:WebDriver.py

示例2: main

# 需要導入模塊: import downloader [as 別名]
# 或者: from downloader import Downloader [as 別名]
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) 
開發者ID:denex,項目名稱:hls-downloader,代碼行數:25,代碼來源:main.py

示例3: __init__

# 需要導入模塊: import downloader [as 別名]
# 或者: from downloader import Downloader [as 別名]
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 
開發者ID:corpnewt,項目名稱:SSDTTime,代碼行數:15,代碼來源:dsdt.py

示例4: createDownloader

# 需要導入模塊: import downloader [as 別名]
# 或者: from downloader import Downloader [as 別名]
def createDownloader(self, url, filename = None, resume = False):
		return Downloader(self.window, url, filename, resume)

	# 子進程 
開發者ID:Lanfei,項目名稱:hae,代碼行數:6,代碼來源:api.py

示例5: downloadVideo

# 需要導入模塊: import downloader [as 別名]
# 或者: from downloader import Downloader [as 別名]
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 
開發者ID:mrknow,項目名稱:filmkodi,代碼行數:28,代碼來源:main.py


注:本文中的downloader.Downloader方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。