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


Python Scraper.__init__方法代码示例

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


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

示例1: __init__

# 需要导入模块: from scraper import Scraper [as 别名]
# 或者: from scraper.Scraper import __init__ [as 别名]
	def __init__(self, base_url = awards_base_url, search_url = ""):
		Scraper.__init__(self, base_url, search_url)
		self.file = open('academy_awards.csv', 'wb')
		self.writer = csv.writer(self.file, delimiter='\t')
		self.writer.writerow(['Year', 'Category', 'Won', 'FilmName', 'ActorDirectorName'])
		self.soup = self.connect(base_url)
		self.next_record = '1'
开发者ID:jercoh,项目名称:project_luther,代码行数:9,代码来源:awards_scraper.py

示例2: __init__

# 需要导入模块: from scraper import Scraper [as 别名]
# 或者: from scraper.Scraper import __init__ [as 别名]
 def __init__(self):
     Scraper.__init__(self)
     api_key = self.config["youtube"]["api_key"]
     self.url = "https://www.googleapis.com/youtube/v3/search"
     self.params = {
       "order": "date",
       "maxResults": 10,
       "channelId": "UCH1dpzjCEiGAt8CXkryhkZg",
       "key": api_key,
       "type": "upload",
       "part": "snippet"
     }
开发者ID:rtrox,项目名称:bernie_scrapers,代码行数:14,代码来源:bernie_2016.py

示例3: __init__

# 需要导入模块: from scraper import Scraper [as 别名]
# 或者: from scraper.Scraper import __init__ [as 别名]
 def __init__(self):
     Scraper.__init__(self)
     self.url = "https://go.berniesanders.com/page/event/search_results"
     self.html = HTMLParser()
     self.params = {
         'orderby': 'zip_radius',
         'zip_radius[1]': '6000',
         'zip_radius[0]': '78218',
         'radius_unit': 'mi',
         'country': 'US',
         'format': 'json'
     }
     self.map = {
         "id": "original_id",
         "start_dt": "start_time"
     }
开发者ID:SandersForPresident,项目名称:bernie_scrapers,代码行数:18,代码来源:events.py

示例4: __init__

# 需要导入模块: from scraper import Scraper [as 别名]
# 或者: from scraper.Scraper import __init__ [as 别名]
 def __init__(self):
     Scraper.__init__(self)
     c = self.config["bsd"]
     self.html = HTMLParser()
     self.call_path = "/page/api/event/search_events"
     self.params = {
         "api_ver": "2",
         "api_id": c["api_id"],
         "api_ts": str(int(time.time()))
     }
     self.signed_params = self.sign_params(c["api_secret"])
     self.url = "".join([
         c["endpoint"],
         self.call_path,
         "?",
         self.signed_params
     ])
     self.map = {
         "event_id": "original_id",
         "start_dt": "start_time"
     }
开发者ID:rtrox,项目名称:bernie_scrapers,代码行数:23,代码来源:events.py

示例5: __init__

# 需要导入模块: from scraper import Scraper [as 别名]
# 或者: from scraper.Scraper import __init__ [as 别名]
 def __init__(self):
     Scraper.__init__(self)
     self.root = 'http://bitsnoop.com'
     self.site = "bitsnoop.com"
开发者ID:jakesyl,项目名称:metatorrente,代码行数:6,代码来源:bs_scraper.py

示例6: __init__

# 需要导入模块: from scraper import Scraper [as 别名]
# 或者: from scraper.Scraper import __init__ [as 别名]
 def __init__(self):
     Scraper.__init__(self)
     self.url = "https://berniesanders.com/issues/feed/"
     self.html = HTMLParser()
开发者ID:SandersForPresident,项目名称:bernie_scrapers,代码行数:6,代码来源:issues.py

示例7: __init__

# 需要导入模块: from scraper import Scraper [as 别名]
# 或者: from scraper.Scraper import __init__ [as 别名]
 def __init__(self, *args, **kwargs):
     Scraper.__init__(self, *args, **kwargs)
     self.shopify_app_handle = kwargs.get("shopify_app_handle", None)
     self.shopify_app_url = kwargs.get("shopify_app_url", None)
     self.tloc = threading.local()
     self.shop_urls = []
开发者ID:danielfv,项目名称:shopify_review_scraper,代码行数:8,代码来源:__init__.py

示例8: __init__

# 需要导入模块: from scraper import Scraper [as 别名]
# 或者: from scraper.Scraper import __init__ [as 别名]
 def __init__(self, *args, **kwargs):
     # initialize our super classes
     Scraper.__init__(self)  #, prefetch=self.prefetch)
     # set regex's
     self.__set_regex()
开发者ID:nuka1195,项目名称:lyrics.xbmc_lyrics,代码行数:7,代码来源:lyrics.py

示例9: __init__

# 需要导入模块: from scraper import Scraper [as 别名]
# 或者: from scraper.Scraper import __init__ [as 别名]
 def __init__(self):
     Scraper.__init__(self)
     self.site = "monova.com"
开发者ID:jakesyl,项目名称:metatorrente,代码行数:5,代码来源:monova_scraper_rss.py


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