-
Notifications
You must be signed in to change notification settings - Fork 15
Open
Labels
enhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomersup-for-grabsThis issue is up for grabs!This issue is up for grabs!
Description
Not really sure how to go about making changes - but it would be great if we could get player stats to include player bio so we can have their date of birth etc. If we get it as a timestamp then we can also use it as useable data, same for height and weight.
Something like this? Sorry if this is not the way of going about things.
`
player_bio={}
for i in soup.find_all('b'):
if(re.sub(r"[\n\t\s]*", "", i.get_text())=="Born:"):
player_bio["dob"]=re.sub(r"[\n\t\s]*", "", i.next_sibling.replace(" (",""))
timestamp = (datetime.strptime(player_bio["dob"], '%d-%b-%Y') - datetime(1970, 1, 1)).total_seconds()
player_bio["timestamp"]=timestamp
if(re.sub(r"[\n\t\s]*", "", i.get_text())=="Height:"):
player_bio["height"]=re.sub("[^0-9]", "",i.next_sibling)
if(re.sub(r"[\n\t\s]*", "", i.get_text())=="Weight:"):
player_bio["weight"]=re.sub("[^0-9]", "",i.next_sibling) `
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomersup-for-grabsThis issue is up for grabs!This issue is up for grabs!