Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dota2 get_upcoming_and_ongoing_games #22

Open
OhGui opened this issue Jul 31, 2023 · 0 comments
Open

dota2 get_upcoming_and_ongoing_games #22

OhGui opened this issue Jul 31, 2023 · 0 comments

Comments

@OhGui
Copy link

OhGui commented Jul 31, 2023

	for match in matches:
		game = {}
		cells = match.find_all('td')
		try:
			game['team1'] = cells[0].find('span',class_='team-template-image').find('a').get('title')
			game['format'] = cells[1].find('abbr').get_text()
			game['team2'] = cells[2].find('span',class_='team-template-image').find('a').get('title')
			game['start_time'] = cells[3].find('span',class_="timer-object").get_text()
			game['tournament'] = cells[3].find('div').get_text().rstrip()
			try:
				game['twitch_channel'] = cells[3].find('span',class_="timer-object").get('data-stream-twitch')
			except AttributeError:
				pass
			games.append(game)
		except AttributeError:
			continue

get team name class has changed “team-template-image-icon”

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant