Created
April 28, 2025 10:27
-
-
Save p4p1/f54913fa449943d054707d7156f9f23d to your computer and use it in GitHub Desktop.
⚡⚡⚡⚡
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python | |
| # -*- coding: utf-8 -*- | |
| # Made by papi | |
| # Created on: Fri 20 Sep 2024 04:36:32 PM IST | |
| # mario_cube_wii_ware_dumper.py | |
| # Description: | |
| # This python script will download all of the wad file present on the | |
| # wii ware section of the mario cube website. All credit goes to them this | |
| # is just a little script to make downloading files there easier. | |
| import requests | |
| from bs4 import BeautifulSoup | |
| URL="https://repo.mariocube.com/WADs/_WiiWare,%20VC,%20DLC,%20Channels%20&%20IOS/" | |
| def dl_file(url, file_name): | |
| response = requests.get(url, stream=True) | |
| if response.status_code == 200: | |
| with open(file_name, 'wb') as file: | |
| for chunck in response.iter_content(chunk_size=8192): | |
| file.write(chunck) | |
| return True | |
| return False | |
| let = ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z' ] | |
| for letter in let: | |
| response = requests.get(URL + letter + "/") | |
| if response.status_code == 200: | |
| soup = BeautifulSoup(response.text, 'html.parser') | |
| links = soup.find_all('a', href=True) | |
| href_links = [link['href'] for link in links] | |
| i = 0 | |
| for l in href_links: | |
| if i % 2 == 0: | |
| i += 1 | |
| continue | |
| i += 1 | |
| if "USA" in l: | |
| if dl_file(URL + letter + "/" + l,l.replace('%20', ' ')): | |
| print("done: %s" % l.replace('%20', ' ')) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment