def __init__(self, wipeTable=False): super(EspnSpider, self).__init__() self.allowed_domains = ["espn.go.com"] self.leagueid = settings.get("LEAGUE_ID") self.start_urls = ["http://games.espn.go.com/ffl/tools/projections?&leagueId={}".format(self.leagueid)] if wipeTable: wipe_raw_data(source=self.name)
def __init__(self, wipeTable=False): super(EspnSpider, self).__init__() self.allowed_domains = [ 'espn.go.com', 'games.espn.go.com', 'games.espn.com' ] self.leagueid = settings.get('LEAGUE_ID') self.start_urls = [ "http://games.espn.go.com/ffl/tools/projections?&leagueId={}".format(self.leagueid) ] if wipeTable: wipe_raw_data(source=self.name)
def __init__(self, wipeTable=False): super(CbsSpider, self).__init__() self.allowed_domains = ['cbssports.com'] self.start_urls = [ "http://fantasynews.cbssports.com/fantasyfootball/stats/weeklyprojections/{}/season/avg/ppr?&print_rows=9999".format(poskey) for poskey in ['QB', 'RB', 'WR', 'TE'] ] self.passkeys = [ 'passing_c', 'passing_a', 'passing_yds', 'passing_td', 'passing_int' ] self.rushkeys = ['rushing_r', 'rushing_yds', 'rushing_td'] self.reckeys = ['receiving_rec', 'receiving_yds', 'receiving_tot'] if wipeTable: wipe_raw_data(source=self.name)