-
-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: restrict sites in config browser cookies settings (#333)
* use enums for supported sites and forum * fix: bugs from previous changes * fix: domain fix * refactor: remove aenum and use inherentance * refactor: remove import * refactor: dynamically decide which sites to allow * update poetry * ran ruff * refactor: remove sites that appear in supportforums from supported hosts * refactor: add aenum again use extend_enum to add members * fix: apply fix from ruff * ran ruff --------- Co-authored-by: datawhores <[email protected]>
- Loading branch information
1 parent
4efd392
commit dfed245
Showing
7 changed files
with
131 additions
and
111 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
168 changes: 88 additions & 80 deletions
168
cyberdrop_dl/utils/data_enums_classes/supported_domains.py
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,86 +1,94 @@ | ||
from __future__ import annotations | ||
from aenum import StrEnum, extend_enum | ||
|
||
from dataclasses import dataclass | ||
from typing import ClassVar | ||
FORUMS = [ | ||
("celebforum", "celebforum.to"), | ||
("f95zone", "f95zone.to"), | ||
("leakedmodels", "leakedmodels.com"), | ||
("nudostar", "nudostar.com"), | ||
("xbunker", "xbunker.nu"), | ||
] | ||
|
||
WEBSITES = [ | ||
("bunkr", "bunkr"), | ||
("bunkrr", "bunkrr"), | ||
("coomer", "coomer"), | ||
("cyberdrop", "cyberdrop"), | ||
("cyberfile", "cyberfile"), | ||
("e-hentai", "e-hentai"), | ||
("erome", "erome"), | ||
("fapello", "fapello"), | ||
("gofile", "gofile"), | ||
("host.church", "host.church"), | ||
("hotpic", "hotpic"), | ||
("ibb.co", "ibb.co"), | ||
("imageban", "imageban"), | ||
("imagepond.net", "imagepond.net"), | ||
("img.kiwi", "img.kiwi"), | ||
("imgbox", "imgbox"), | ||
("imgur", "imgur"), | ||
("jpeg.pet", "jpeg.pet"), | ||
("jpg.church", "jpg.church"), | ||
("jpg.fish", "jpg.fish"), | ||
("jpg.fishing", "jpg.fishing"), | ||
("jpg.homes", "jpg.homes"), | ||
("jpg.pet", "jpg.pet"), | ||
("jpg1.su", "jpg1.su"), | ||
("jpg2.su", "jpg2.su"), | ||
("jpg3.su", "jpg3.su"), | ||
("jpg4.su", "jpg4.su"), | ||
("jpg5.su", "jpg5.su"), | ||
("kemono", "kemono"), | ||
("mediafire", "mediafire"), | ||
("nudostar.tv", "nudostar.tv"), | ||
("omegascans", "omegascans"), | ||
("pimpandhost", "pimpandhost"), | ||
("pixeldrain", "pixeldrain"), | ||
("postimg", "postimg"), | ||
("realbooru", "realbooru"), | ||
("real-debrid", "real-debrid"), | ||
("redd.it", "redd.it"), | ||
("reddit", "reddit"), | ||
("redgifs", "redgifs"), | ||
("rule34.xxx", "rule34.xxx"), | ||
("rule34.xyz", "rule34.xyz"), | ||
("rule34vault", "rule34vault"), | ||
("saint", "saint"), | ||
("scrolller", "scrolller"), | ||
("socialmediagirls", "socialmediagirls"), | ||
("toonily", "toonily"), | ||
("tokyomotion.net", "tokyomotion.net"), | ||
("xbunkr", "xbunkr"), | ||
("xxxbunker", "xxxbunker"), | ||
] | ||
|
||
@dataclass | ||
class SupportedDomains: | ||
"""The allows options for domains to skip when scraping and mappings.""" | ||
|
||
supported_hosts: ClassVar[tuple[str, ...]] = ( | ||
"bunkr", | ||
"bunkrr", | ||
"celebforum", | ||
"coomer", | ||
"cyberdrop", | ||
"cyberfile", | ||
"e-hentai", | ||
"erome", | ||
"f95zone", | ||
"fapello", | ||
"gofile", | ||
"host.church", | ||
"hotpic", | ||
"ibb.co", | ||
"imageban", | ||
"imagepond.net", | ||
"img.kiwi", | ||
"imgbox", | ||
"imgur", | ||
"jpeg.pet", | ||
"jpg.church", | ||
"jpg.fish", | ||
"jpg.fishing", | ||
"jpg.homes", | ||
"jpg.pet", | ||
"jpg1.su", | ||
"jpg2.su", | ||
"jpg3.su", | ||
"jpg4.su", | ||
"jpg5.su", | ||
"kemono", | ||
"leakedmodels", | ||
"mediafire", | ||
"nudostar.com", | ||
"nudostar.tv", | ||
"omegascans", | ||
"pimpandhost", | ||
"pixeldrain", | ||
"postimg", | ||
"realbooru", | ||
"real-debrid", | ||
"redd.it", | ||
"reddit", | ||
"redgifs", | ||
"rule34.xxx", | ||
"rule34.xyz", | ||
"rule34vault", | ||
"saint", | ||
"scrolller", | ||
"socialmediagirls", | ||
"toonily", | ||
"tokyomotion.net", | ||
"xbunker", | ||
"xbunkr", | ||
"xxxbunker", | ||
) | ||
class SupportedForums(StrEnum): | ||
pass | ||
|
||
supported_forums: ClassVar[tuple[str, ...]] = ( | ||
"celebforum.to", | ||
"f95zone.to", | ||
"forums.socialmediagirls.com", | ||
"leakedmodels.com", | ||
"nudostar.com", | ||
"xbunker.nu", | ||
) | ||
supported_forums_map: ClassVar[dict[str, str]] = { | ||
"celebforum.to": "celebforum", | ||
"f95zone.to": "f95zone", | ||
"forums.socialmediagirls.com": "socialmediagirls", | ||
"leakedmodels.com": "leakedmodels", | ||
"nudostar.com": "nudostar", | ||
"xbunker.nu": "xbunker", | ||
} | ||
|
||
sites: list[str] | ||
class SupportedHosts(StrEnum): | ||
pass | ||
|
||
|
||
class SupportedHostsDebug(StrEnum): | ||
pass | ||
|
||
|
||
class SupportedSites(StrEnum): | ||
pass | ||
|
||
|
||
class SupportedSitesDebug(StrEnum): | ||
pass | ||
|
||
|
||
for site in FORUMS: | ||
extend_enum(SupportedForums, site[0], site[1]) | ||
for site in WEBSITES: | ||
extend_enum(SupportedHosts, site[0], site[1]) | ||
for site in [*WEBSITES, ("simpcity", "simpcity")]: | ||
extend_enum(SupportedHostsDebug, site[0], site[1]) | ||
for site in [*WEBSITES, *FORUMS]: | ||
extend_enum(SupportedSites, site[0], site[1]) | ||
for site in [*WEBSITES, *FORUMS, ("simpcity", "simpcity")]: | ||
extend_enum(SupportedSitesDebug, site[0], site[1]) |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[tool.poetry] | ||
name = "cyberdrop-dl-patched" | ||
version = "5.7.2" | ||
version = "5.7.3.dev1" | ||
description = "Bulk downloader for multiple file hosts" | ||
authors = ["Jacob B <[email protected]>"] | ||
readme = "README.md" | ||
|
@@ -35,9 +35,9 @@ lz4 = "^4.3.3" | |
pycryptodomex = "^3.21.0" | ||
jeepney = [{platform = "linux", version = "^0.8.0"},{platform = "bsd", version = "^0.8.0"}] | ||
xxhash = "^3.5.0" | ||
humanfriendly = "^10.0" | ||
pyreadline3 = "^3.5.4" | ||
pydantic = "^2.10.2" | ||
aenum = "^3.1.15" | ||
|
||
[tool.poetry.scripts] | ||
cyberdrop-dl = "cyberdrop_dl.main:main" | ||
|