hltv-async-api 0.4.2__tar.gz → 0.4.3b0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {hltv_async_api-0.4.2 → hltv_async_api-0.4.3b0}/PKG-INFO +1 -1
- {hltv_async_api-0.4.2 → hltv_async_api-0.4.3b0}/hltv_async_api/__init__.py +1 -1
- {hltv_async_api-0.4.2 → hltv_async_api-0.4.3b0}/hltv_async_api/aiohltv.py +6 -11
- {hltv_async_api-0.4.2 → hltv_async_api-0.4.3b0}/hltv_async_api.egg-info/PKG-INFO +1 -1
- {hltv_async_api-0.4.2 → hltv_async_api-0.4.3b0}/pyproject.toml +1 -1
- {hltv_async_api-0.4.2 → hltv_async_api-0.4.3b0}/setup.py +1 -1
- {hltv_async_api-0.4.2 → hltv_async_api-0.4.3b0}/LICENSE +0 -0
- {hltv_async_api-0.4.2 → hltv_async_api-0.4.3b0}/README.md +0 -0
- {hltv_async_api-0.4.2 → hltv_async_api-0.4.3b0}/hltv_async_api.egg-info/SOURCES.txt +0 -0
- {hltv_async_api-0.4.2 → hltv_async_api-0.4.3b0}/hltv_async_api.egg-info/dependency_links.txt +0 -0
- {hltv_async_api-0.4.2 → hltv_async_api-0.4.3b0}/hltv_async_api.egg-info/top_level.txt +0 -0
- {hltv_async_api-0.4.2 → hltv_async_api-0.4.3b0}/setup.cfg +0 -0
|
@@ -445,7 +445,6 @@ class Hltv:
|
|
|
445
445
|
live_matches = r.find("div", {'class', 'liveMatchesSection'}).find_all("div", {'class', 'liveMatch-container'})
|
|
446
446
|
except AttributeError:
|
|
447
447
|
live_matches = []
|
|
448
|
-
live_mat = []
|
|
449
448
|
for live in live_matches:
|
|
450
449
|
id_ = live.find('a', {'class': 'match a-reset'})['href'].split('/')[2]
|
|
451
450
|
teams = live.find_all("div", class_="matchTeamName text-ellipsis")
|
|
@@ -464,20 +463,16 @@ class Hltv:
|
|
|
464
463
|
score_team1 = 0
|
|
465
464
|
score_team2 = 0"""
|
|
466
465
|
|
|
467
|
-
|
|
466
|
+
matches.append({
|
|
468
467
|
'id': id_,
|
|
468
|
+
'date': 'LIVE',
|
|
469
469
|
'team1': team1,
|
|
470
470
|
'team2': team2,
|
|
471
471
|
't1_id': t1_id,
|
|
472
472
|
't2_id': t2_id
|
|
473
473
|
})
|
|
474
474
|
|
|
475
|
-
matches.append({
|
|
476
|
-
'date': 'LIVE',
|
|
477
|
-
'matches': live_mat,
|
|
478
|
-
})
|
|
479
475
|
for date_sect in r.find_all('div', {'class': 'upcomingMatchesSection'}):
|
|
480
|
-
upc_matches = []
|
|
481
476
|
date_ = date_sect.find('span', {'class': 'matchDayHeadline'}).text.split(' ')[-1]
|
|
482
477
|
for match in date_sect.find_all('div', {'class': 'upcomingMatch'}):
|
|
483
478
|
teams_ = match.find_all("div", class_="matchTeamName text-ellipsis")
|
|
@@ -495,8 +490,9 @@ class Hltv:
|
|
|
495
490
|
except IndexError:
|
|
496
491
|
pass
|
|
497
492
|
|
|
498
|
-
|
|
493
|
+
matches.append({
|
|
499
494
|
'id': id_,
|
|
495
|
+
'date': date_,
|
|
500
496
|
'time': time_,
|
|
501
497
|
'team1': team1_,
|
|
502
498
|
'team2': team2_,
|
|
@@ -504,8 +500,6 @@ class Hltv:
|
|
|
504
500
|
't2_id': t2_id
|
|
505
501
|
})
|
|
506
502
|
|
|
507
|
-
matches.append({'date': date_, 'matches': upc_matches})
|
|
508
|
-
|
|
509
503
|
return matches
|
|
510
504
|
async def get_featured_events(self, max_: int = 1):
|
|
511
505
|
r = await self._fetch('https://www.hltv.org/events')
|
|
@@ -590,7 +584,7 @@ class Hltv:
|
|
|
590
584
|
return events
|
|
591
585
|
|
|
592
586
|
async def get_event_info(self, event_id: str | int, event_title: str):
|
|
593
|
-
#TODO ADD
|
|
587
|
+
#TODO ADD WINNER?
|
|
594
588
|
|
|
595
589
|
r = await self._fetch(f"https://www.hltv.org/events/{str(event_id)}/{event_title.replace(' ', '-')}")
|
|
596
590
|
if not r:
|
|
@@ -776,6 +770,7 @@ class Hltv:
|
|
|
776
770
|
return players
|
|
777
771
|
|
|
778
772
|
async def get_last_news(self, max_reg_news=2, only_today=True, only_featured=False):
|
|
773
|
+
|
|
779
774
|
r = await self._fetch('https://www.hltv.org/')
|
|
780
775
|
|
|
781
776
|
today = datetime.now(tz=pytz.timezone('Europe/Copenhagen'))
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{hltv_async_api-0.4.2 → hltv_async_api-0.4.3b0}/hltv_async_api.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|