Skip to content

Commit

Permalink
Bug Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
junioralive committed Aug 11, 2024
1 parent 5ef985e commit b2bc7a0
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 15 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
/build
/dist
/spycli.egg-info
3 changes: 1 addition & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

setup(
name='spycli',
version='1.0.0',
version='1.0.1',
author='junioralive',
author_email='support@junioralive.in',
description='A cli tool to browse and watch Movie/TV Shows/Anime/Kdrama/Cdráma/MORE',
Expand All @@ -16,7 +16,6 @@
'pyfzf',
'beautifulsoup4',
'packaging',
'cryptography',
],
entry_points={
'console_scripts': [
Expand Down
16 changes: 3 additions & 13 deletions spycli/utils/helper/getapi.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
from cryptography.fernet import Fernet
import requests
import base64

key = b'3sOYMy7Ybm3oJHNk71R6W8iVg3NcRin0tm6I7KKYE9k='
cipher = Fernet(key)

def fetch_api_key():
url = "https://api.github.com/repos/junioralive/spycli-api/contents/keys/apikey.txt"

Expand All @@ -19,14 +15,8 @@ def fetch_api_key():
return None

def fetch_api():
encrypted_url = fetch_api_key()
if encrypted_url is None:
api_url = fetch_api_key()
if api_url is None:
return None

try:
decrypted_bytes = cipher.decrypt(encrypted_url.encode())
decrypted_url = decrypted_bytes.decode()
return decrypted_url
except Exception as e:
print(f"[!] Error during decryption: {e}")
return None
return api_url

0 comments on commit b2bc7a0

Please sign in to comment.