update file structure

This commit is contained in:
Noe
2024-12-21 22:29:49 +01:00
parent 5b0c26fe0b
commit bc22a4ee12
5 changed files with 5 additions and 4 deletions
+65
View File
@@ -0,0 +1,65 @@
import aria2p
import subprocess
import keyboard
import os
from core.scraper import uri
aria2 = aria2p.API(
aria2p.Client(
host="http://localhost",
port=6800,
secret=""
)
)
download_paused = False
def pauseDownload(_):
global download_paused
if download_paused == True:
print("Error: Download already paused.")
else:
print("Download is being paused...")
download_paused = True
aria2.pause_all()
def startDownload(_):
global download_paused
if download_paused == True:
aria2.resume_all()
print("Download Resumed!")
download_paused = False
else:
print("Download Started!")
download = aria2.add_magnet(uri)
download_paused = False
def terminate():
return
# print("Enter Download URL: ")
# uri = input()
#Magnet Download
# downloads_dir = os.path.join(os.path.expanduser("~"), "Downloads")
# subprocess.Popen(["aria2c", "--enable-rpc", "--rpc-listen-all=true", f"--dir={downloads_dir}"])
# magnet_uri = "magnet:?xt=urn:btih:7FBF03CCC9115260DC50102E5A31E83E91422A79&dn=Ready+or+Not%3A+LSPD+Bundle+%28v66884+%2B+4+DLCs%2FBonuses+%2B+Windows+7+Fix%2C+MULTi12%29+%5BFitGirl+Repack%2C+Selective+Download+-+from+34.7+GB%5D&tr=udp%3A%2F%2Fopentor.net%3A6969&tr=udp%3A%2F%2Ftracker.torrent.eu.org%3A451%2Fannounce&tr=udp%3A%2F%2Ftracker.theoks.net%3A6969%2Fannounce&tr=udp%3A%2F%2Ftracker.ccp.ovh%3A6969%2Fannounce&tr=udp%3A%2F%2Ftracker.opentrackr.org%3A1337%2Fannounce&tr=http%3A%2F%2Ftracker.opentrackr.org%3A1337%2Fannounce&tr=udp%3A%2F%2Fopen.stealth.si%3A80%2Fannounce&tr=https%3A%2F%2Ftracker.tamersunion.org%3A443%2Fannounce&tr=udp%3A%2F%2Fexplodie.org%3A6969%2Fannounce&tr=http%3A%2F%2Ftracker.bt4g.com%3A2095%2Fannounce&tr=udp%3A%2F%2Fbt2.archive.org%3A6969%2Fannounce&tr=udp%3A%2F%2Fbt1.archive.org%3A6969%2Fannounce&tr=udp%3A%2F%2Ftracker.filemail.com%3A6969%2Fannounce&tr=udp%3A%2F%2Ftracker1.bt.moack.co.kr%3A80%2Fannounce&tr=udp%3A%2F%2Ftracker.opentrackr.org%3A1337%2Fannounce&tr=http%3A%2F%2Ftracker.openbittorrent.com%3A80%2Fannounce&tr=udp%3A%2F%2Fopentracker.i2p.rocks%3A6969%2Fannounce&tr=udp%3A%2F%2Ftracker.internetwarriors.net%3A1337%2Fannounce&tr=udp%3A%2F%2Ftracker.leechers-paradise.org%3A6969%2Fannounce&tr=udp%3A%2F%2Fcoppersurfer.tk%3A6969%2Fannounce&tr=udp%3A%2F%2Ftracker.zer0day.to%3A1337%2Fannounce"
# #Torrent Download
# downloads_dir = os.path.join(os.path.expanduser("~"), "Downloads")
# subprocess.Popen(["aria2c", "--enable-rpc", "--rpc-listen-all=true", f"--dir={downloads_dir}"])
# torrent_path = "C:/Users/Downloads/Ready or Not.torrent"
#Direct Download
downloads_dir = os.path.join(os.path.expanduser("~"), "Downloads")
subprocess.Popen(["aria2c", "--enable-rpc", "--rpc-listen-all=true", f"--dir={downloads_dir}"])
uri
downloads = aria2.get_downloads()
for download in downloads:
print(download.name, downloads.download_speed, download.status)
keyboard.on_press_key("d", startDownload, suppress=False)
keyboard.on_press_key("s", pauseDownload, suppress=False)
keyboard.on_press_key("q", pauseDownload, terminate)
keyboard.wait("q")
+1
View File
@@ -0,0 +1 @@
# shit is emptyyyy
+144
View File
@@ -0,0 +1,144 @@
from bs4 import BeautifulSoup
import requests
import re
url = "https://steamrip.com/games-list-page/"
response = requests.get(url)
if response.status_code == 200:
soup = BeautifulSoup(response.text, "html.parser")
links = soup.find_all("a")
games_dict = {}
for link in links:
href = link.get("href", "").lower()
text = link.text.strip()
if re.search(r"/discord/", href):
continue
if text:
games_dict[text] = href
game_titles = list(games_dict.keys())
if game_titles:
for title in game_titles:
pass
else:
print("No game titles found. Report this on Github.")
else:
print(f"Failed to retrieve the page. Status code: {response.status_code}")
def search_games(query, game_titles):
results = [title for title in game_titles if query.lower() in title.lower()]
return results
search_query = input("Enter a game title to search: ")
search_results = search_games(search_query, game_titles)
if search_results:
print("Search Results:")
for idx, result in enumerate(search_results, start=1):
print(f"{idx}. {result}")
try:
selection = int(input("Select a game by entering the corresponding number: "))
if 1 <= selection <= len(search_results):
selected_game = search_results[selection - 1]
selected_link = games_dict[selected_game] # Retrieve the link from the dictionary
print(f"You selected: {selected_game}")
print(f"Link: https://steamrip.com{selected_link}")
else:
print("Invalid selection.")
except ValueError:
print("Invalid input. Please enter a number.")
else:
print("No matching game titles found.")
#scrape download links
game_url = f"https://steamrip.com{selected_link}"
keywords = ["megadb.com", "buzzheavier.com", "gofile.io"]
def scrape_buzzheavier(url):
try:
response = requests.get(url)
response.raise_for_status()
soup = BeautifulSoup(response.text, 'html.parser')
links = soup.find_all('a', href=True)
for link in links:
href = link['href']
full_dl_url = f"https:{href}" if href.startswith("//") else href
if full_dl_url.startswith("https://buzzheavier.com/dl/"):
print(f"Found direct download link: {full_dl_url}")
return
print(f"No direct download link found on {url}")
except requests.RequestException as e:
print(f"Failed to fetch {url}: {e}")
def scrape_links(url):
try:
response = requests.get(url)
response.raise_for_status()
soup = BeautifulSoup(response.text, 'html.parser')
links = soup.find_all('a', href=True)
for link in links:
href = link['href']
full_url = f"https:{href}" if href.startswith("//") else href
if any(keyword in full_url for keyword in keywords):
print(f"Found link: {full_url} on site: {url}")
if "buzzheavier.com" in full_url:
scrape_buzzheavier(full_url)
except requests.RequestException as e:
print(f"Failed to fetch {url}: {e}")
scrape_links(game_url)
# DDL = {
# "https://steamrip.com/",
# "https://cs.rin.ru/",
# "https://gamesdrive.net/",
# "https://gog-games.to/",
# "https://forum.torrminatorr.com/",
# "https://ankergames.net/",
# "https://www.ovagames.com/",
# "https://online-fix.me/",
# "https://gamebounty.world/",
# "https://steamgg.net/",
# "https://g4u.to/",
# "https://appnetica.com/",
# "https://atopgames.com/",
# "https://games4u.org/",
# "https://rexagames.com/",
# "https://cr4ckpass.online/",
# "https://getfreegames.net/",
# "https://gload.to/",
# "https://steamunderground.net/",
# "https://worldofpcgames.com/",
# "http://www.leechinghell.pw/",
# "https://awtdg.site/",
# "https://www.cg-gamespc.com/"
# "https://gamepcfull.com/",
# }
# # Repacks/Torrents
# re_tor = {
# "https://www.kaoskrew.org/",
# "https://fitgirl-repacks.site/",
# "https://m4ckd0ge-repacks.site/",
# "https://byxatab.com/",
# "https://digital-zone.xyz/",
# "https://elamigos.site/",
# "https://dodi-repacks.site/",
# "https://www.tiny-repacks.win/",
# "https://freegogpcgames.com/",
# "https://www.magipack.games/",
# "https://collectionchamber.blogspot.com/",
# "https://archive.org/details/classicpcgames",
# "https://websites.umich.edu/~archive/",
# }