I'm scraping some pages to gather data on athletes. I start off like so:
req = requests.get(url)
soup = BeautifulSoup(req.text, "html.parser")
and I go on to get things like the athlete's name, team, height, weight, etc.
Once I've finished gathering the data, I want to create an instance of my athlete class. Obviously, when testing, I can just do something like this:
david_ortiz = athlete.Athlete(name, team, height, weight)
My problem is that I don't know how to name these new instances (outside of when I'm making instances like david_ortiz for testing). How do I name these instances without hardcoding the athletes name in advance? It's also possible that there could be multiple athletes with the same name so maybe this wouldn't be the best solution? If that's the case, what do people do in this situation?