shhhh
This commit is contained in:
@@ -23,6 +23,8 @@ logger.addHandler(ch)
|
||||
|
||||
load_dotenv()
|
||||
TOKEN = os.getenv('DISCORD_TOKEN')
|
||||
pixelget_token = os.getenv('PIXELGET_TOKEN')
|
||||
copyparty_token = os.getenv('COPYPARTY_TOKEN')
|
||||
|
||||
#Bot intents
|
||||
intents = discord.Intents.default()
|
||||
@@ -42,7 +44,7 @@ def pixelget(url: str):
|
||||
except AssertionError:
|
||||
logger.warning("Link was not a torrent")
|
||||
else:
|
||||
response = requests.get(f'https://pixeldrain.com/api/file/{url.split("/")[-1]}?download', headers={"Authorization": (":bdf70819-9e47-4a3f-861a-41fd448939db")})
|
||||
response = requests.get(f'https://pixeldrain.com/api/file/{url.split("/")[-1]}?download', headers={"Authorization": (f":{pixelget_token}")})
|
||||
with open(title, "wb") as f:
|
||||
f.write(response.content)
|
||||
|
||||
@@ -63,7 +65,7 @@ def dayuploads_get(url: str):
|
||||
def uploadfile(file_name: str):
|
||||
with open(file_name, "rb") as torrent_file:
|
||||
response = requests.put(f"https://upload.fieryeagle.org/torfiles/{file_name}",
|
||||
torrent_file, auth=("admin","TVcZRYhT5Cd#@eY8P9NxNN2mC"))
|
||||
torrent_file, auth=("admin",copyparty_token))
|
||||
try:
|
||||
assert response.status_code in range(200, 300)
|
||||
except AssertionError:
|
||||
|
||||
Reference in New Issue
Block a user