本文整理汇总了Python中job.Job.__init__方法的典型用法代码示例。如果您正苦于以下问题:Python Job.__init__方法的具体用法?Python Job.__init__怎么用?Python Job.__init__使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类job.Job
的用法示例。
在下文中一共展示了Job.__init__方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: from job import Job [as 别名]
# 或者: from job.Job import __init__ [as 别名]
def __init__(self,doc):
Job.__init__(self, doc)
try:
self.format = self.format
except AttributeError:
self.format = "json"
try:
self.coll_type = self.coll_type
except AttributeError:
self.coll_type = None
self._dict_values = {}
self._dict_values["sources"] = {
"filename": "%s/export_%s_sources_%s.%s" %(self.project_name, self.name, self.date, self.format),
"format": self.format,
"fields": 'url,origin,date.date',
}
self._dict_values["logs"] = {
"filename": "%s/export_%s_logs_%s.%s" %(self.project_name,self.name, self.date, self.format),
"format":self.format,
"fields": 'url,code,scope,status,msg',
}
self._dict_values["results"] = {
"filename": "%s/export_%s_results_%s.%s" %(self.project_name,self.name, self.date, self.format),
"format":self.format,
"fields": 'url,domain,title,content.content,outlinks.url,crawl_date',
}
示例2: __init__
# 需要导入模块: from job import Job [as 别名]
# 或者: from job.Job import __init__ [as 别名]
def __init__(self, agent_obj):
Job.__init__(self, agent_obj)
self.conn = None
self.key = None
示例3: __init__
# 需要导入模块: from job import Job [as 别名]
# 或者: from job.Job import __init__ [as 别名]
def __init__(self, job, sitedef, scheme, next_start=None, start_offset=None):
Job.__init__(self, job, scheme)
self.id = job[u'_id'] if job else None
self.sitedef = sitedef
self.next_start = next_start
self.start_offset = start_offset
示例4: __init__
# 需要导入模块: from job import Job [as 别名]
# 或者: from job.Job import __init__ [as 别名]
def __init__(self, agent_obj, c_job):
Job.__init__(self, agent_obj)
self.conn = None
self.key = None
self.connect_job = c_job