Code Monkey home page Code Monkey logo

hltv-api's People

Contributors

aca19lj avatar dependabot[bot] avatar grantephross avatar hojlund123 avatar makusu720 avatar samjross avatar sockspls avatar zgrav avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

hltv-api's Issues

URL appends bad string for event name in get_matches():

py -3 .\HLTVbot.py
[{'date': '2022-06-01', 'url': '/matches/2356290/iem-dallas-2022-group-b-upper-bracket-semi-final-2-iem-dallas-2022', 'time': '02:00', 'event': b'ESL Challenger League Season 41 North America', 'team1': b'Unjustified', 'team2': b'ATK'}]

_findTeamId is returning None

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'}]

get_matches() function needs to be updated

HLTV matches page updated, so the function needs too. Temporary solution(returns matches for today):

def get_matches():
    matches = get_parsed_page("http://www.hltv.org/matches/")
    matches_list = []
    upcoming = matches.find("div", {"class": "upcomingMatchesContainer"})
    todaymatches = upcoming.find_all("div", {"class": "upcomingMatchesSection"})[0]
    for i in todaymatches.find_all("div", {"class": "upcomingMatch"}):
        team1 = str(i.find("div", {"class": "matchTeam team1"}).find("div", {"class": "matchTeamName text-ellipsis"}))[41:-6]
        team2 = str(i.find("div", {"class": "matchTeam team2"}).find("div", {"class": "matchTeamName text-ellipsis"}))[41:-6]
        time = str(i.find("div", {"class": "matchTime"}))[74:-6]
        matches_list.append({'team1': team1, 'team2': team2, 'time': time})
    return matches_list

Matches by team id

Hey guys, im trying to up a Pull Request, with this feature, if you guys likes it, i want to contribute with the project. but dont have permission.

the matches will displayed on get_team_info method, with a new property called matches, which give us, the id and name of both teams, the confront name, and the name of the event

{ ...,
'matches': [{'championship': 'ESL Pro League Season 16',
              'confront_name': 'FURIA X Eternal Fire',
              'date': '21/09/2022',
              'full_time': '21/09/2022 at 16:00',
              'teams': {'team_1': 'FURIA',
                        'team_1_id': '8297',
                        'team_2': 'Eternal Fire',
                        'team_2_id': '11251'},
              'time': '16:00'},
             {'championship': 'ESL Pro League Season 16',
              'confront_name': 'FURIA X Movistar Riders',
              'date': '22/09/2022',
              'full_time': '22/09/2022 at 16:00',
              'teams': {'team_1': 'FURIA',
                        'team_1_id': '8297',
                        'team_2': 'Movistar Riders',
                        'team_2_id': '7718'},
              'time': '16:00'}],
 ...,
 }

seang@res' name is hidden in the HTML

HLTV is detecting it as an email address because of the @ in the name, and the workaround we have only works for his name right now. I'll look into it, maybe they store the name somewhere else

Failed to get parsed page

This does not work anymore does it?
Looks like the cloudflare protection got increased.

get_parsed_page returns:

Icon for www.hltv.org www.hltv.org

Checking if the site connection is secure

Enable JavaScript and cookies to continue
www.hltv.org needs to review the security of your connection before proceeding.

No issue - just a thanks!

Hey man,

Wasn't sure how to contact you, so thought this would be a good way!

I recently forked your HLTV API and used it a small starter project of mine and wanted to make sure you're happy with me using it?

Also to say thank you for creating it! I was trying to do similar but my execution was no where near as good as yours!

Anyway hope everything is good for you, considering all that's going on!

If you want to get back to me, my email is [email protected]

Take it easy!
Matthew

Access to SteamID of players

HLTV API, is there a way to get the SteamID of the players?

Example, HLTV top 100 teams and from these 100 teams get the steamID of all 5 players of each team. Is something like this possible?

Or HLTV does not have this information?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.