def _request(self):
"""Sends the request
Returns:
list
"""
if not memcache.add(type(self).__name__, True, 3):
time.sleep(3)
logging.info('Scraping %s' % (type(self).__name__))
url = "https://www.usatoday.com/sports/mlb/sagarin/2017/team/"
response = urlfetch.fetch(url)
try:
ratings = self._scrape(response.content)
except (AttributeError, IndexError) as e:
logging.exception(e)
ratings = []
return ratings
评论列表
文章目录