本文整理汇总了Python中Crawler.Crawler.__init__方法的典型用法代码示例。如果您正苦于以下问题:Python Crawler.__init__方法的具体用法?Python Crawler.__init__怎么用?Python Crawler.__init__使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Crawler.Crawler
的用法示例。
在下文中一共展示了Crawler.__init__方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: from Crawler import Crawler [as 别名]
# 或者: from Crawler.Crawler import __init__ [as 别名]
def __init__(self):
crawler.__init__(self)
self.title = ''
self.press = ''
self.date = ''
self.time = ''
self.contents = ''
示例2: __init__
# 需要导入模块: from Crawler import Crawler [as 别名]
# 或者: from Crawler.Crawler import __init__ [as 别名]
def __init__(self):
# parent construct
Crawler.__init__(self)
self.crawl_cookie = {}
self.status_code = ''
self.history = ''
示例3: __init__
# 需要导入模块: from Crawler import Crawler [as 别名]
# 或者: from Crawler.Crawler import __init__ [as 别名]
def __init__(self, forced=False):
Crawler.__init__(self)
self.results = set()
self.forced = forced
self.success_count = None
self.failure_count = None
self.blacklist = []
self.name_exceptions = ["http://www.cplusplus.com/reference/string/swap/"]
示例4: __init__
# 需要导入模块: from Crawler import Crawler [as 别名]
# 或者: from Crawler.Crawler import __init__ [as 别名]
def __init__(self, filename):
Crawler.__init__(self)
self.viewed_url = set() # store the href with hash value
self.candidate_url = list()
self.database = self.connectDb()
示例5: __init__
# 需要导入模块: from Crawler import Crawler [as 别名]
# 或者: from Crawler.Crawler import __init__ [as 别名]
def __init__(self):
crawler.__init__(self)
self.articleList = []
示例6: __init__
# 需要导入模块: from Crawler import Crawler [as 别名]
# 或者: from Crawler.Crawler import __init__ [as 别名]
def __init__(self, filename):
Crawler.__init__(self)
self.viewed_url = set() # store the href with hash value
self.candidate_url = list()
self.database = CsvDatabase(filename)
self.database.buildColumn(['url', 'content'])
示例7: __init__
# 需要导入模块: from Crawler import Crawler [as 别名]
# 或者: from Crawler.Crawler import __init__ [as 别名]
def __init__(self, short_name, long_name, base_url, domain, nested_scrape=False):
Crawler.__init__(self, base_url, domain, nested_scrape=nested_scrape)
self.short_name = short_name
self.long_name = long_name