Skip to content
Permalink
master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
import random
import requests
import time
import wikipedia
import json
welcome = ["Hello", "Hi", "Hey"]
print (random.choice(welcome))
time.sleep(0.5)
print('WELCOME TO CLUB DETAILS AND FIXTURES.')
time.sleep(1)
def main():
print("1. club details")
print("2. fixtures")
user_Input=int(input("Please enter number: "))
if user_Input == 1:
user_input = str(input("Enter the club name: \n >> "))
wiki_search = wikipedia.search(user_input)
club_details = wikipedia.summary(user_input)
print(club_details)
if user_Input == 2:
#the API key for daily fixures:u5vj7cd3j6uq6ysp4qvv5bk7
api_address ='https://api.sportradar.us/soccer-t3/eu/en/schedules/2018-12-01/schedule.json?api_key=u5vj7cd3j6uq6ysp4qvv5bk7'
json_data = requests.get(api_address).json()
for item in json_data['sport_events']:
print(item['competitors'][0]['name'])
print(item['competitors'][0]['country'])
print(item['competitors'][0]['qualifier'])
print(" VS ")
print(item['competitors'][1]['name'])
print(item['competitors'][1]['country'])
print(item['competitors'][1]['qualifier'])
print("\n")
main()