mirror of
https://github.com/nprasad2077/nbaStats.git
synced 2026-11-05 17:45:48 +00:00
playoff scraper works w/ modified team names
This commit is contained in:
1 parent
58ac01bced
commit
35d672b1d6
2 files changed
+60
-1
No files matched your search
@@ -0,0 +1,48 @@
|
||||
# Generated by Django 4.2 on 2023-05-01 18:00
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('nba_data', '0007_alter_playertotalsdata_ast_and_more'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.CreateModel(
|
||||
name='PlayerPlayoffTotalsData',
|
||||
fields=[
|
||||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('player_name', models.CharField(max_length=255, null=True)),
|
||||
('age', models.IntegerField(null=True)),
|
||||
('games', models.IntegerField(null=True)),
|
||||
('games_started', models.IntegerField(null=True)),
|
||||
('minutes_played', models.IntegerField(null=True)),
|
||||
('field_goals', models.IntegerField(null=True)),
|
||||
('field_attempts', models.IntegerField(null=True)),
|
||||
('field_percent', models.DecimalField(decimal_places=3, max_digits=6, null=True)),
|
||||
('three_fg', models.IntegerField(null=True)),
|
||||
('three_attempts', models.IntegerField(null=True)),
|
||||
('three_percent', models.DecimalField(decimal_places=3, max_digits=6, null=True)),
|
||||
('two_fg', models.IntegerField(null=True)),
|
||||
('two_attempts', models.IntegerField(null=True)),
|
||||
('two_percent', models.DecimalField(decimal_places=3, max_digits=6, null=True)),
|
||||
('effect_fg_percent', models.DecimalField(decimal_places=3, max_digits=6, null=True)),
|
||||
('ft', models.IntegerField(null=True)),
|
||||
('fta', models.IntegerField(null=True)),
|
||||
('ft_percent', models.DecimalField(decimal_places=3, max_digits=6, null=True)),
|
||||
('ORB', models.IntegerField(null=True)),
|
||||
('DRB', models.IntegerField(null=True)),
|
||||
('TRB', models.IntegerField(null=True)),
|
||||
('AST', models.IntegerField(null=True)),
|
||||
('STL', models.IntegerField(null=True)),
|
||||
('BLK', models.IntegerField(null=True)),
|
||||
('TOV', models.IntegerField(null=True)),
|
||||
('PF', models.IntegerField(null=True)),
|
||||
('PTS', models.IntegerField(null=True)),
|
||||
('team', models.CharField(default='', max_length=30)),
|
||||
('season', models.IntegerField(null=True)),
|
||||
],
|
||||
),
|
||||
]
|
||||
@@ -16,8 +16,19 @@ django.setup()
|
||||
from nba_data.models import PlayerPlayoffTotalsData
|
||||
|
||||
# Change CHO to CHA 2014 and prior.
|
||||
# Change NOP to NOH for 2013 and prior.
|
||||
# Change OKC to SEA for 2008 and prior.
|
||||
# Change NOH to NOK for 2007 and 2006
|
||||
# Change NOK to NOH for 2005 and prior.
|
||||
# Change NOH to CHH for 2002 and prior. NOLA did not have a team before 2003.
|
||||
# Change WAS to WSB for 1997 and prior.
|
||||
# Change BRK to NJN for 2012 and prior.
|
||||
# Change MEM to VAN for 2001 and prior.
|
||||
# Change LAC to SDC for 1984 and prior.
|
||||
|
||||
|
||||
teams = ['HOU' ,'PHI', 'BOS', 'NYK', 'NJN', 'TOR', 'MEM', 'NOH', 'DAL', 'SAS', 'DEN', 'MIN', 'OKC', 'UTA', 'POR', 'MIL', 'CLE', 'CHI', 'IND', 'DET', 'SAC', 'PHO', 'GSW', 'LAC', 'LAL', 'MIA', 'ATL', 'WAS', 'ORL', 'CHA']
|
||||
|
||||
teams = ['HOU' ,'PHI', 'BOS', 'NYK', 'BRK', 'TOR', 'MEM', 'NOP', 'DAL', 'SAS', 'DEN', 'MIN', 'OKC', 'UTA', 'POR', 'MIL', 'CLE', 'CHI', 'IND', 'DET', 'SAC', 'PHO', 'GSW', 'LAC', 'LAL', 'MIA', 'ATL', 'WAS', 'ORL', 'CHO']
|
||||
team_abbreviations = ['ATL', 'BOS', 'BRK', 'CHI', 'CHO', 'CLE', 'DAL', 'DEN', 'DET', 'GSW', 'HOU', 'IND', 'LAC', 'LAL', 'MEM', 'MIA', 'MIL', 'MIN', 'NOP', 'NYK', 'OKC', 'ORL', 'PHI', 'PHO', 'POR', 'SAC', 'SAS', 'TOR', 'UTA', 'WAS']
|
||||
|
||||
season = input('What season? ')
|
||||
|
||||
Reference in new issue
Block a user