ask for input

This commit is contained in:
nprasad2077 committed 2023-04-14 14:34:41 -05:00
1 parent 0f754caac3
commit 5980df86ff
2 files changed
+12 -2

No files matched your search

+1
View File
@@ -1,3 +1,4 @@
from django.db import models
# Create your models here.
+11 -2
View File
@@ -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')