insert username and password SdarotAPI
This commit is contained in:
@@ -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']
|
||||
|
||||
Reference in New Issue
Block a user