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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: hltv_async_api
3
- Version: 0.4.2
3
+ Version: 0.4.3b0
4
4
  Summary: Hltv-aio An unofficial asynchronous HLTV API Wrapper for Python
5
5
  Home-page: https://github.com/akimerslys/aiohltv
6
6
  Author: akimerslys
@@ -6,4 +6,4 @@
6
6
  from .aiohltv import Hltv
7
7
 
8
8
  __author__ = 'akimerslys'
9
- __version__ = '0.4.2'
9
+ __version__ = '0.4.3b'
@@ -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
- live_mat.append({
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
- upc_matches.append({
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 PLACEC FOR PAST EVENTS? OR WINNER?
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'))
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: hltv_async_api
3
- Version: 0.4.2
3
+ Version: 0.4.3b0
4
4
  Summary: Hltv-aio An unofficial asynchronous HLTV API Wrapper for Python
5
5
  Home-page: https://github.com/akimerslys/aiohltv
6
6
  Author: akimerslys
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "hltv_async_api"
3
- version = "0.4.2"
3
+ version = "0.4.3b"
4
4
  authors = [
5
5
  { name="Akim Slys", email="akimslys2003@gmail.com" },
6
6
  ]
@@ -2,7 +2,7 @@ from setuptools import setup, find_packages
2
2
 
3
3
  setup(
4
4
  name='hltv_async_api',
5
- version='0.4.2',
5
+ version='0.4.3b',
6
6
  author='akimerslys',
7
7
  author_email='akimslys2003@gmail.com',
8
8
  description='Hltv-aio: An unofficial asynchronous HLTV API Wrapper for Python',
File without changes