mirror of
https://github.com/Laborratte5/linux-iso-seeder.git
synced 2025-12-31 01:18:16 +01:00
Adding debian
This commit is contained in:
parent
12d5d697bd
commit
ba24ef62b4
1 changed files with 32 additions and 19 deletions
|
|
@ -65,23 +65,36 @@ def fetch_ubuntu_lts():
|
||||||
return False
|
return False
|
||||||
|
|
||||||
def fetch_debian_stable():
|
def fetch_debian_stable():
|
||||||
url = "https://cdimage.debian.org/debian-cd/current/amd64/iso-dvd/"
|
urls = [
|
||||||
|
"https://cdimage.debian.org/debian-cd/current/amd64/bt-dvd/",
|
||||||
|
"https://cdimage.debian.org/debian-cd/current/arm64/bt-dvd/",
|
||||||
|
"https://cdimage.debian.org/debian-cd/current/amd64/bt-cd/",
|
||||||
|
"https://cdimage.debian.org/debian-cd/current/arm64/bt-cd/"
|
||||||
|
]
|
||||||
|
results = {}
|
||||||
|
|
||||||
|
for url in urls:
|
||||||
try:
|
try:
|
||||||
r = requests.get(url, timeout=30)
|
r = requests.get(url, timeout=30)
|
||||||
r.raise_for_status()
|
r.raise_for_status()
|
||||||
soup = BeautifulSoup(r.text, "html.parser")
|
soup = BeautifulSoup(r.text, "html.parser")
|
||||||
|
|
||||||
|
results[url] = False
|
||||||
for link in soup.find_all('a', href=True):
|
for link in soup.find_all('a', href=True):
|
||||||
href = link['href']
|
href = link['href']
|
||||||
if "-DVD-1.iso.torrent" in href:
|
if ".iso.torrent" in href:
|
||||||
torrent_url = url + href
|
torrent_url = url + href
|
||||||
name = href.replace(".iso.torrent", "")
|
name = href.replace(".iso.torrent", "")
|
||||||
return download_torrent(name, torrent_url)
|
results[name] = download_torrent(name, torrent_url)
|
||||||
|
break
|
||||||
|
else:
|
||||||
logging.warning("No Debian DVD-1 torrent found.")
|
logging.warning("No Debian DVD-1 torrent found.")
|
||||||
return False
|
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
logging.error(f"Debian fetch error: {e}")
|
logging.error(f"Debian fetch error: {e}")
|
||||||
return False
|
results[url] = False
|
||||||
|
|
||||||
|
return results
|
||||||
|
|
||||||
def fetch_arch_latest():
|
def fetch_arch_latest():
|
||||||
torrent_url = "https://geo.mirror.pkgbuild.com/iso/latest/archlinux-x86_64.iso.torrent"
|
torrent_url = "https://geo.mirror.pkgbuild.com/iso/latest/archlinux-x86_64.iso.torrent"
|
||||||
|
|
@ -170,7 +183,7 @@ if __name__ == "__main__":
|
||||||
success_count = 0
|
success_count = 0
|
||||||
failure_count = 0
|
failure_count = 0
|
||||||
|
|
||||||
for func in [fetch_ubuntu_lts, fetch_debian_stable, fetch_fedora_latest, fetch_arch_latest, fetch_kali_latest, fetch_distrowatch_torrents]:
|
for func in [fetch_ubuntu_lts, fetch_debian_stable, fetch_kali_latest, fetch_arch_latest, fetch_distrowatch_torrents]:
|
||||||
if func():
|
if func():
|
||||||
success_count += 1
|
success_count += 1
|
||||||
else:
|
else:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue