liquipediapy icon indicating copy to clipboard operation
liquipediapy copied to clipboard

dota2 get_upcoming_and_ongoing_games

Open OhGui opened this issue 1 year ago • 0 comments

	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”

OhGui avatar Jul 31 '23 13:07 OhGui