Skip to content

Commit 0664234

Browse files
complete 1.5.1
fix: #27 - format links are now fully customizable fix: #26 - pixeldrain speeds are much faster now. 5x increase fix: #24 - buzzheavier works once again this release mainly focuses on fixes and enhancements.
2 parents ad73df2 + f50b4df commit 0664234

17 files changed

+92
-135
lines changed

.gitignore

+3
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,6 @@ Mul-Tor.spec
1919
Build Releases.bat
2020
presets/readme.txt
2121
big_game.zip
22+
possible_sites.txt
23+
preset_sorter.py
24+
preset_sorter.json

README.md

+8-8
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@
3030
### Currently supported sites:
3131
Site | API | API Key Required | Max File Size
3232
--- | --- | --- | ---
33-
[GoFile][7] | [Yes][8] | No | ∞
34-
[PixelDrain][1] | [Yes][2] | No | 20 GB
33+
[Gofile][7] | [Yes][8] | No | ∞
34+
[Pixeldrain][1] | [Yes][2] | No | 20 GB
3535
[BowFile][17] | [Yes][18] | [Yes][19] | 5 GB
3636
[Doodrive][36] | [Yes][37] | [Yes][38] | 5 GB
3737
[Download.gg][102] | No | No | 25 GB
@@ -40,23 +40,23 @@ Site | API | API Key Required | Max File Size
4040
[Files.dp.ua][108] | No | No | 100 GB
4141
[Files.fm][45] | No | No | 5 GB
4242
[Krakenfiles][124] | No | No | 1 GB
43-
[Transfer.sh][98] | No | No | ∞
43+
[Transfer_sh.sh][98] | No | No | ∞
4444
[/tmp/files][117] | [Yes][118] | No | 100 MB
45-
[MixDrop][29] | [Yes][30] | [Yes][30] | ∞
45+
[Mixdrop][29] | [Yes][30] | [Yes][30] | ∞
4646
[1Fichier][31] | [Yes][32] | No | 300 GB
4747
[Oshi][9] | No | No | 5 GB
4848
[File.io][70] | No | No | 2 GB
4949
[EasyUpload][72] | No | No | 10 GB
5050
[AnonTransfer][127] | No | No | 5 GB
51-
[AnonymFile][134] | [Yes][135] | No | 7 GB
51+
[Anonymfile][134] | [Yes][135] | No | 7 GB
5252
[File.si][145] | [Yes][146] | No | 7 GB
5353
[1CloudFile][133] | No | No | 5 GB
5454
[ClicknUpload][160] | No | No | 2 GB
5555
[FileUpload][161] | No | No | 5 GB
5656
[HexUpload][21] | No | No | 2 GB
5757
[UserCloud][161] | No | No | 5 GB
5858
[UFile][68] | [Yes][69] | No | 5 GB
59-
[CatBox][168] | [Yes][169] | No | 200 MB
59+
[Catbox][168] | [Yes][169] | No | 200 MB
6060
[LitterBox][170] | [Yes][171] | No | 1 GB
6161
[Keep.sh][172] | No | No | 500 MB
6262
[TempSend][173] | No | No | 2 GB
@@ -184,8 +184,8 @@ None Currently :)
184184
[26]: https://sendspace.com/
185185
[27]: https://sendspace.com/dev_method.html
186186
[28]: https://sendspace.com/dev_apikeys.html
187-
[29]: https://MixDrop.ag/
188-
[30]: https://MixDrop.ag/api/
187+
[29]: https://Mixdrop.ag/
188+
[30]: https://Mixdrop.ag/api/
189189
[31]: https://1fichier.com/
190190
[32]: https://1fichier.com/api.html
191191
[33]: https://uptobox.com/

main.py

+12-40
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,14 @@
1717

1818
###
1919
# Things in this part are meant for debugging and toggling certaint things.
20-
use_test_file = True
20+
use_test_file = False
2121
test_small_file = True
2222
test_large_file = False
2323
SKIP_SITE_CHECK = True
2424
#
2525
###
2626

27-
version = "1.5.0"
27+
version = "1.5.1"
2828
owd = os.getcwd()
2929
platform = sys.platform
3030

@@ -190,23 +190,23 @@ def selection(config, available, user_agents_list, proxy_list=""):
190190
}
191191

192192
uploader_classes = {
193-
"PixelDrain": PixelDrain,
194-
"GoFile": GoFile,
193+
"Pixeldrain": Pixeldrain,
194+
"Gofile": Gofile,
195195
"Oshi": Oshi,
196196
"FileBin": FileBin,
197197
"Delafil": Delafil,
198198
"Files.dp.ua": Files_dp_ua,
199-
"FilesFM": FilesFM,
199+
"FilesFm": FilesFm,
200200
"Krakenfiles": Krakenfiles,
201-
"Transfer": Transfer,
201+
"Transfer.sh": Transfer_sh,
202202
"TmpFiles": TmpFiles,
203-
"MixDrop": MixDrop,
203+
"Mixdrop": Mixdrop,
204204
"1Fichier": OneFichier,
205205
"Fileio": Fileio,
206206
"EasyUpload": EasyUpload,
207207
"AnonTransfer": AnonTransfer,
208208
"1CloudFile": OneCloudFile,
209-
"AnonymFile": AnonymFile,
209+
"Anonymfile": Anonymfile,
210210
"FileSi": FileSi,
211211
"FileUpload": FileUpload,
212212
"ClicknUpload": ClicknUpload,
@@ -215,8 +215,8 @@ def selection(config, available, user_agents_list, proxy_list=""):
215215
"UserCloud": UserCloud,
216216
"DooDrive": DooDrive,
217217
"uFile": uFile,
218-
"DownloadGG": DownloadGG,
219-
"CatBox": CatBox,
218+
"Download.gg": Download_gg,
219+
"Catbox": Catbox,
220220
"LitterBox": LitterBox,
221221
"Keep": Keep,
222222
"TempSend": TempSend,
@@ -248,11 +248,11 @@ def selection(config, available, user_agents_list, proxy_list=""):
248248
file_links.close()
249249
if auto_load_preset == True and link_format != "" and DEBUG == False:
250250
with open("file_links_formatted.txt", "a") as formatted_links_file:
251-
formatted_links_file.writelines(f"{datetime.now()} | {site} | {file_name} - {link_format.format(status=status, file_name=file_name, file_url=file_url, site_name=site)}\n")
251+
formatted_links_file.writelines(f"{link_format.format(status=status, file_name=file_name, file_url=file_url, site_name=site, date_and_time=datetime.now())}\n")
252252
formatted_links_file.close()
253253

254254
elif status == "error":
255-
if site in ["Transfer", "Keep"]:
255+
if site in ["Transfer_sh", "Keep"]:
256256
print(f"{error} {colored(site, 'yellow')} fucked up again while uploading the file {colored(file_name, 'light_blue')}. Don't Report this! Its a known issue they need to fix.")
257257
else:
258258
print(f"{error} An error occurred while uploading the file {colored(file_name, 'light_blue')} to {colored(site, 'yellow')}! Please report this. Exception: {colored(exception_str, 'red')}")
@@ -301,35 +301,7 @@ def selection(config, available, user_agents_list, proxy_list=""):
301301
TODO: Quack
302302
TODO: Simplify Code. I think this is possible and should be done in order to maintain a clean and easy to read code.
303303
304-
these are here for later...
305-
https://uplodea.com/en
306-
https://fastupload.io/
307-
https://filepost.io/
308-
https://workupload.com/
309-
https://dropbox.com/features/share
310-
https://uploadnow.io/en
311-
https://uploadify.net/
312-
https://4shared.com/
313-
https://zipshare.com/
314-
https://usaupload.com/
315-
https://fileroy.com/
316-
https://upfiles.com/
317-
https://file-up.org/
318-
https://mediafire.com/developers/
319-
https://dropsend.com/
320-
https://surgesend.com/
321-
https://filesharing.com/
322-
https://file.guru/en
323-
https://uploady.io/
324-
https://bestfile.io/en
325-
https://megaup.net/faq.html
326-
https://mirrored.to/
327-
https://similarsites.com/site/download.gg
328-
https://workupload.com/
329304
330-
"""
331-
332-
"""
333305
Here you can also find some buried credits.
334306
335307
Arrow Icon from Kirill Kazachek on https://flaticon.com/authors/kirill-kazachek

modules/anonymfile.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88
from .pretty_print import *
99
from main import DEBUG
1010

11-
site = "AnonymFile"
11+
site = "Anonymfile"
1212

13-
class AnonymFile:
13+
class Anonymfile:
1414

1515
def Uploader(file, proxy_list, user_agents, api_keys):
1616
raw_req = "None :("

modules/buzzheavier.py

+6-11
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,14 @@ def Uploader(file, proxy_list, user_agents, api_keys):
2626
# Select a random user agent
2727
ua = random.choice(user_agents)
2828
upload_url = sites_data_dict[site]["url"]
29+
download_url_base = sites_data_dict[site]["download_url_base"]
2930

3031
# Get the file size and name
3132
file_name = os.path.basename(file)
3233

3334
# Set the user agent header
3435
headers = {
35-
"User-Agent": "curl/8.4.0",
36+
"User-Agent": ua,
3637
"Accept": "*/*",
3738
"Content-Length": str(os.path.getsize(file))
3839
}
@@ -45,27 +46,21 @@ def Uploader(file, proxy_list, user_agents, api_keys):
4546

4647
# Send the upload request with the form data, headers, and proxies
4748
with open(file, "rb") as file_upload:
48-
raw_req = requests.put(url=f"{upload_url}{file_name}", data=file_upload, headers=headers, proxies=proxies, timeout=300, stream=True)
49+
raw_req = requests.put(url=f"{upload_url}{file_name}?expiry=10368000", data=file_upload, headers=headers, proxies=proxies, timeout=300, stream=True)
4950
file_upload.close()
50-
if raw_req.status_code == 200:
51+
if raw_req.status_code == 201:
5152

5253
try:
5354
raw_req = raw_req.json()
54-
download_url = raw_req.get("url")
55+
download_url = raw_req.get("id")
5556

5657
except Exception as e:
5758
return {"status": "error", "file_name": file_name, "exception": str(e), "extra": raw_req.text}
5859

59-
return {"status": "ok", "file_name": file_name, "file_url": download_url}
60+
return {"status": "ok", "file_name": file_name, "file_url": f"{download_url_base}{download_url}"}
6061
else:
6162
raise Exception(raw_req.status_code)
6263

63-
file_id = raw_req.text
64-
download_url = download_url_base + file_id.replace("&", "_")
65-
66-
# Return successful message with the status, file name, file URL, and site
67-
return {"status": "ok", "file_name": file_name, "file_url": download_url}
68-
6964
except Exception as e:
7065
# Return error message
7166
return {"status": "error", "file_name": file_name, "exception": str(e), "extra": raw_req}

modules/catbox.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@
66
from .pretty_print import *
77
from main import DEBUG
88

9-
site = "CatBox"
9+
site = "Catbox"
1010

11-
class CatBox:
11+
class Catbox:
1212
def Uploader(file, proxy_list, user_agents, api_keys):
1313
"""
1414
Uploads a file to a specified site using random user agents and proxies.

modules/config_manager.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ def Writer():
5858
"apiKey": "",
5959
"apiToken": ""
6060
},
61-
"MixDrop": {
61+
"Mixdrop": {
6262
"email": "",
6363
"apiKey": ""
6464
},

modules/deprecated/anonymfile-api.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,17 @@
77
from .pretty_print import *
88
from main import DEBUG
99

10-
site = "AnonymFile"
10+
site = "Anonymfile"
1111

1212
"""
1313
Last Checked 24/03/2024
14-
This is the API version of AnonymFile. They broke the API a while ago so i replaced it with the non-api variant for now.
14+
This is the API version of Anonymfile. They broke the API a while ago so i replaced it with the non-api variant for now.
1515
1616
"""
1717

1818
"""
1919
20-
"AnonymFile": {
20+
"Anonymfile": {
2121
"apiKey": False,
2222
"url": "https://anonymfile.com/api/v1/upload",
2323
"api_url": "https://anonymfile.com/",
@@ -28,7 +28,7 @@
2828
2929
"""
3030

31-
class AnonymFile:
31+
class Anonymfile:
3232

3333
def Uploader(file, proxy_list, user_agents, api_keys):
3434
raw_req = "None :("

modules/downloadgg.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@
66
from .pretty_print import *
77
from main import DEBUG
88

9-
site = "DownloadGG"
9+
site = "Download.gg"
1010

11-
class DownloadGG:
11+
class Download_gg:
1212
def Uploader(file, proxy_list, user_agents, api_keys):
1313
"""
1414
Uploads a file to a specified site using random user agents and proxies.

modules/filesfm.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77
from .pretty_print import *
88
from main import DEBUG
99

10-
site = "FilesFM"
10+
site = "FilesFm"
1111

12-
class FilesFM:
12+
class FilesFm:
1313

1414
def Uploader(file, proxy_list, user_agents, api_keys):
1515
raw_req = "None :("

modules/gofile.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@
66
from .pretty_print import *
77
from main import DEBUG
88

9-
site = "GoFile"
9+
site = "Gofile"
1010

11-
class GoFile:
11+
class Gofile:
1212

1313
def Uploader(file, proxy_list, user_agents, api_keys):
1414
raw_req = "None :("

modules/mixdrop.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77
from .pretty_print import *
88
from main import DEBUG
99

10-
site = "MixDrop"
10+
site = "Mixdrop"
1111

12-
class MixDrop:
12+
class Mixdrop:
1313

1414
def Uploader(file, proxy_list, user_agents, api_keys):
1515
raw_req = "None :("

modules/pixeldrain.py

+17-14
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,44 @@
1-
import requests
21
import os
32
import random
4-
3+
import urllib3
54
from .site_data import Site_Data_CLSS, sites_data_dict
65
from .pretty_print import *
76
from .logger import Logger
7+
import json
88

9-
site = "PixelDrain"
10-
11-
class PixelDrain:
9+
class Pixeldrain:
1210

13-
def Uploader(file, proxy_list, user_agents, api_keys):
11+
@staticmethod
12+
def Uploader(file, proxy_list, user_agents, api_keys):
1413
try:
14+
site = "Pixeldrain" # Moved the 'site' definition inside the method
15+
1516
ua = random.choice(user_agents)
1617
size_limit = f'{sites_data_dict[site]["size_limit"]} {sites_data_dict[site]["size_unit"]}'
1718

1819
base_url = sites_data_dict[site]["download_url_base"]
1920

2021
file_size = os.stat(file).st_size
2122
file_name = os.path.basename(file)
22-
file_name = (file_name[:240] + '..') if len(file_name) > 240 else file_name # Changed from 255 to 240 as an additional safety net.
23-
23+
file_name = (file_name[:240] + '..') if len(file_name) > 240 else file_name
24+
2425
upload_url = sites_data_dict[site]["url"].format(file_name=file_name)
2526

2627
calc_size = Site_Data_CLSS.size_unit_calc(site, file_size)
2728

2829
headers = {"User-Agent": ua, "Content-Type": "application/octet-stream"}
29-
proxies = random.choice(proxy_list) if proxy_list else None
30+
proxy = random.choice(proxy_list) if proxy_list else None
3031

3132
if calc_size == "OK":
33+
http = urllib3.PoolManager()
3234
with open(file, "rb") as file_upload:
33-
req = requests.put(url=upload_url, data=file_upload, headers=headers, proxies=proxies, timeout=300, stream=True).json()
34-
file_upload.close()
35-
return {"status": "ok", "file_name": file_name, "file_url": base_url + req['id']}
35+
req = http.urlopen('PUT', upload_url, body=file_upload, headers=headers, timeout=300)
36+
if req.status != 201:
37+
raise Exception(f"HTTP Error {req.status}: {req.reason}")
38+
response_json = json.loads(req.data.decode('utf-8'))
39+
return {"status": "ok", "file_name": file_name, "file_url": base_url + response_json['id']}
3640
else:
3741
return {"status": "size_error", "file_name": file_name, "exception": "SIZE_ERROR", "size_limit": size_limit}
3842

3943
except Exception as e:
40-
return {"status": "error", "file_name": file_name, "exception": str(e), "extra": raw_req}
41-
44+
return {"status": "error", "file_name": file_name, "exception": str(e)}

0 commit comments

Comments
 (0)