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


Python Analyzer.get_loan_list方法代码示例

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


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

示例1: get_loan_list

# 需要导入模块: from Analyzer import Analyzer [as 别名]
# 或者: from Analyzer.Analyzer import get_loan_list [as 别名]
    def get_loan_list(url, cache, use_cookie=False):
        """ 获取散标列表, 返回列表 """
        domain = PaipaiDai.get_domain(url)
        data, cache = Server.get(url, cache=cache, use_cookie=use_cookie)
        if data:
            data, next_page = Analyzer.get_loan_list(data)
            if next_page:
                next_page = os.path.join(domain, next_page.lstrip('/'))
            return data, next_page, cache

        return [], None, False
开发者ID:zhengbomo,项目名称:python_practice,代码行数:13,代码来源:PaipaiDai.py

示例2: get_loan_all_list

# 需要导入模块: from Analyzer import Analyzer [as 别名]
# 或者: from Analyzer.Analyzer import get_loan_list [as 别名]
    def get_loan_all_list(url, total_page=1):
        """ 获取散标列表, 返回列表 """
        domain = PaipaiDai.get_domain(url)
        result = []
        data, cache = Server.get(url, cache=False)
        if data:
            data, next_page = Analyzer.get_loan_list(data)
            print url
            result.extend(data)

            if next_page and total_page > 1:
                next_page = os.path.join(domain, next_page.lstrip('/'))
                time.sleep(3)
                result.extend(PaipaiDai.get_loan_list(next_page, total_page-1))
        return result
开发者ID:zhengbomo,项目名称:python_practice,代码行数:17,代码来源:PaipaiDai.py

示例3: __open_well_loan

# 需要导入模块: from Analyzer import Analyzer [as 别名]
# 或者: from Analyzer.Analyzer import get_loan_list [as 别名]
    def __open_well_loan(url, page_count=1):
        domain = PaipaiDai.get_domain(url)
        data, cache = Server.get(url, cache=False, use_cookie=True)
        if data:
            loans, next_page = Analyzer.get_loan_list(data)

            # 处理列表
            for loan in loans:
                if u'首次' not in loan['title'] and u'第1次' not in loan['title']:
                    # 过滤第一次的用户
                    PpOpen.analyze_loan(loan['detail_url'])
                    time.sleep(2)

            if next_page and page_count > 0:
                time.sleep(2)
                next_page = os.path.join(domain, next_page.lstrip('/'))
                PpOpen.open_well_loan(next_page, page_count=page_count-1)
开发者ID:zhengbomo,项目名称:python_practice,代码行数:19,代码来源:PpOpen.py


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