mirror of
https://github.com/nprasad2077/nbaStats.git
synced 2026-11-06 01:50:33 +00:00
ask for input
This commit is contained in:
1 parent
0f754caac3
commit
5980df86ff
2 files changed
+12
-2
No files matched your search
@@ -1,3 +1,4 @@
|
||||
from django.db import models
|
||||
|
||||
# Create your models here.
|
||||
|
||||
+11
-2
@@ -4,10 +4,16 @@ import csv
|
||||
import json
|
||||
import os
|
||||
|
||||
|
||||
team = input('What team? ')
|
||||
season = input('What season? ')
|
||||
|
||||
url_make = 'https://www.basketball-reference.com/teams/' + team + '/' + season + '.html'
|
||||
|
||||
url = 'https://www.basketball-reference.com/teams/HOU/2018.html'
|
||||
lakers = 'https://www.basketball-reference.com/teams/LAL/2020.html'
|
||||
|
||||
response = requests.get(url)
|
||||
response = requests.get(url_make)
|
||||
|
||||
soup = BeautifulSoup(response.text, "html.parser")
|
||||
|
||||
@@ -45,4 +51,7 @@ with open(csv_output_path, "w", newline="") as csvfile:
|
||||
|
||||
json_output_path = os.path.join(script_dir, '..', 'data', 'output.json')
|
||||
with open(json_output_path, 'w') as jsonfile:
|
||||
json.dump(data, jsonfile)
|
||||
json.dump(data, jsonfile)
|
||||
|
||||
|
||||
print('success')
|
||||
Reference in new issue
Block a user