当前位置: 首页>>代码示例>>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;未经允许,请勿转载。