Skip to content

Commit

Permalink
add pixeldrain api key
Browse files Browse the repository at this point in the history
  • Loading branch information
Official-Husko committed Jun 30, 2024
1 parent 20224b3 commit 34afd4e
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion modules/pixeldrain.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,17 @@ def Uploader(file, proxy_list, user_agents, api_keys):

calc_size = Site_Data_CLSS.size_unit_calc(site, file_size)

headers = {"User-Agent": ua, "Content-Type": "application/octet-stream"}
api_key = api_keys.get("apiKey", False)

if api_key in (False, ""):
raise Exception("Missing API Credentials?")

headers = {
"User-Agent": ua,
"Content-Type": "application/octet-stream",
"Cookie": f"pd_auth_key={api_key}"
}

proxy = random.choice(proxy_list) if proxy_list else None

if calc_size == "OK":
Expand Down

0 comments on commit 34afd4e

Please sign in to comment.