Closed researchersec closed 1 year ago
checking this, cheers
Checked it out, you need flaresolver most likely as the request is picked up by cloudflare.
'top5'
[{'id': 9565, 'name': 'Vitality', 'url': 'https://hltv.org/team/9565/vitality'},
{'id': 4869, 'name': 'ENCE', 'url': 'https://hltv.org/team/4869/ence'},
{'id': 5995, 'name': 'G2', 'url': 'https://hltv.org/team/5995/g2'},
{'id': 7175, 'name': 'Heroic', 'url': 'https://hltv.org/team/7175/heroic'},
{'id': 4494, 'name': 'MOUZ', 'url': 'https://hltv.org/team/4494/mouz'}]
Ref: https://github.com/SocksPls/hltv-api/issues/40#issuecomment-1484681313
@zGrav could you provide an example of the api with flaresolverr implemented? Its kinda uselvisk without it seems 🙂
Thanks for raising this concern. However, we need to clarify that bypassing Cloudflare or any other security measures goes beyond the scope of our project. Our focus is on ensuring the ethical and lawful use of our tools. If you have any other questions feel free to ask.
Think hltv did some changes to the team pages, so the _findTeamId helper is broken
hltv.get_results()
[{'url': 'https://hltv.org/matches/2366926/ence-vs-alliance-blast-premier-fall-showdown-2023-europe', 'match-id': 2366926, 'date': '5/10/2023', 'event': 'BLAST Premier Fall Showdown 2023 Europe', 'team1': 'ENCE', 'team1score': 2, 'team1-id': None, 'team2': 'Alliance', 'team2-id': None, 'team2score': 0}, {'url': 'https://hltv.org/matches/2366925/9ine-vs-big-blast-premier-fall-showdown-2023-europe', 'match-id': 2366925, 'date': '5/10/2023', 'event': 'BLAST Premier Fall Showdown 2023 Europe', 'team1': '9INE', 'team1score': 0, 'team1-id': None, 'team2': 'BIG', 'team2-id': None, 'team2score': 2}, {'url': 'https://hltv.org/matches/2366929/imperial-vs-party-astronauts-blast-premier-fall-showdown-2023-americas', 'match-id': 2366929, 'date': '5/10/2023', 'event': 'BLAST Premier Fall Showdown 2023 Americas', 'team1': 'Imperial', 'team1score': 0, 'team1-id': None, 'team2': 'Party Astronauts', 'team2-id': None, 'team2score': 2}, {'url': 'https://hltv.org/matches/2367149/space-vs-forward-winline-insight-season-4', 'match-id': 2367149, 'date': '2023-10-04', 'event': 'Winline Insight Season 4', 'team1': 'Space', 'team1score': 2, 'team1-id': None, 'team2': 'Forward', 'team2-id': None, 'team2score': 0}, {'url': 'https://hltv.org/matches/2367116/mouz-nxt-vs-pge-turow-cct-east-europe-series-3-closed-qualifier', 'match-id': 2367116, 'date': '2023-10-04', 'event': 'CCT East Europe Series 3 Closed Qualifier', 'team1': 'MOUZ NXT', 'team1score': 2, 'team1-id': None, 'team2': 'PGE Turow', 'team2-id': None, 'team2score': 0},
hltv.top5teams()
[{'id': None, 'name': 'Vitality', 'url': 'https://hltv.org/team/9565/vitality'}, {'id': None, 'name': 'ENCE', 'url': 'https://hltv.org/team/4869/ence'}, {'id': None, 'name': 'G2', 'url': 'https://hltv.org/team/5995/g2'}, {'id': None, 'name': 'Heroic', 'url': 'https://hltv.org/team/7175/heroic'}, {'id': None, 'name': 'MOUZ', 'url': 'https://hltv.org/team/4494/mouz'}]