当前位置: 首页>>代码示例>>Python>>正文


Python Helper.downloadString方法代码示例

本文整理汇总了Python中Helper.Helper.downloadString方法的典型用法代码示例。如果您正苦于以下问题:Python Helper.downloadString方法的具体用法?Python Helper.downloadString怎么用?Python Helper.downloadString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Helper.Helper的用法示例。


在下文中一共展示了Helper.downloadString方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: parse_pls

# 需要导入模块: from Helper import Helper [as 别名]
# 或者: from Helper.Helper import downloadString [as 别名]
def parse_pls(url):
    urls = []
    pls_content = Helper.downloadString(url)
    
    stream = Helper.parsePls(pls_content)
    if stream:
        urls.append(stream)
    return urls
开发者ID:dernico,项目名称:mediaschlingel,代码行数:10,代码来源:tunein.py

示例2: parse_m3u

# 需要导入模块: from Helper import Helper [as 别名]
# 或者: from Helper.Helper import downloadString [as 别名]
def parse_m3u(url):

    urls = []
    m3u_content = Helper.downloadString(url)
    
    stream = Helper.parsem3u(m3u_content)
    if stream:
        urls.append(stream)
    return urls
开发者ID:dernico,项目名称:mediaschlingel,代码行数:11,代码来源:tunein.py

示例3: _call

# 需要导入模块: from Helper import Helper [as 别名]
# 或者: from Helper.Helper import downloadString [as 别名]
def _call(url, param=None):
    # print('call radio with path=%s, param=%s', path, param)
    if param:
        param['key'] = yt_key
        url += '?' + urlencode(param)
    print("call tunein with url: " + url)
    response = Helper.downloadString(url)
    json_data = json.loads(response)
    return json_data
开发者ID:dernico,项目名称:mediaschlingel,代码行数:11,代码来源:tunein.py

示例4: _call

# 需要导入模块: from Helper import Helper [as 别名]
# 或者: from Helper.Helper import downloadString [as 别名]
def _call(path, param=None):
        #print('call radio with path=%s, param=%s', path, param)
        url = '{0}/{1}'.format(RadioUrl, path)
        if param:
            url += '?' + urlencode(param)
        print("call radio with url: " + url)
        response = Helper.downloadString(url)
        json_data = json.loads(response)
        return json_data
开发者ID:dernico,项目名称:mediaschlingel,代码行数:11,代码来源:radio.py

示例5: _call

# 需要导入模块: from Helper import Helper [as 别名]
# 或者: from Helper.Helper import downloadString [as 别名]
def _call(path, param=None):
    if param is None:
        param = {}

    param["api_key"] = ApiKey
    param["api_version"] = ApiVersion

    url = '{0}/{1}'.format(TracksUrl, path)
    if param:
        url += '?' + urlencode(param)
    print('call radio with url=%s', url)
    response = Helper.downloadString(url)
    # print("Response: " + response)
    if response:
        json_data = json.loads(response)
        return json_data
    else:
        return None
开发者ID:dernico,项目名称:mediaschlingel,代码行数:20,代码来源:eighttracks.py

示例6: parse_asx

# 需要导入模块: from Helper import Helper [as 别名]
# 或者: from Helper.Helper import downloadString [as 别名]
def parse_asx(url):
    urls = []
    data = Helper.downloadString(url)

    m = re.search(r'\<[Rr]ef.*\"(http.*)\"', data, re.I)
    url = m.group(1)
    print("Found asx url: " + url)
    urls.append(url)

    return urls

    if b'asx' in data.getvalue()[0:50].lower():
        url = parse_new_asx(data)
        urls.append(url)
    else:
        url = parse_old_asx(data)
        urls.append(url)

    return urls
开发者ID:dernico,项目名称:mediaschlingel,代码行数:21,代码来源:tunein.py


注:本文中的Helper.Helper.downloadString方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。