Compare commits

...

5 Commits

Author SHA1 Message Date
c461f7a5a8 add season class 2023-07-18 14:38:14 +03:00
209af375fe add episode class 2023-07-18 14:10:14 +03:00
dfa9a1a09e add url to serie class 2023-07-18 13:54:41 +03:00
5b72076f26 insert username and password SdarotAPI 2023-07-17 14:28:09 +03:00
d3bc698da0 add bs4 2023-07-15 18:24:33 +03:00
3 changed files with 19 additions and 4 deletions

View File

@@ -1,2 +1,3 @@
requests
pyyaml
pyyaml
bs4

View File

@@ -7,12 +7,13 @@ SDAROT_DOMAIN = "sdarot.buzz"
DOWNLOAD_DIRECTORY_PATH = 'downloads'
class SdarotApi:
def __init__(self):
def __init__(self, username, password):
self.session = requests.session()
self.session.headers.update({
'Referer': f'https://www.{SDAROT_DOMAIN}/',
'accepts': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7'
})
self.login(username, password)
def get_cookies(self):
sdarot_cookies = self.session.get(f"https://{SDAROT_DOMAIN}/index").cookies['Sdarot']

View File

@@ -1,7 +1,20 @@
class Episode:
def __init__(self, number, url):
self.number = number
self.url = url
class Season:
def __init__(self, number, url):
self.number = number
self.url = url
class Serie:
def __init__(self, sid, name, seasons):
def __init__(self, sid:str, name:str, seasons:list[Season], url:str):
self.sid = sid
self.name = name
self.seasons = seasons
self.url = url
def get_serie_seasons(self):
def get_serie_seasons(self):
pass