Skip to content

Bulk asynchronous downloader for multiple file hosts

fix: update pixhost domain to pixhost.cc

NTFSvolume3534c0882b35
diff --git a/CHANGELOG.md b/CHANGELOG.md
index f8c637617..590f6dd49 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -31,6 +31,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Changed
- Removed twitter.com and x.com from blocked domains
+- Update primary URL to pixhost.cc (Pixhost)
### Fixed
diff --git a/cyberdrop_dl/crawlers/pixhost.py b/cyberdrop_dl/crawlers/pixhost.py
index fe989fe2a..8c9d49c0d 100644
--- a/cyberdrop_dl/crawlers/pixhost.py
+++ b/cyberdrop_dl/crawlers/pixhost.py
@@ -1,7 +1,8 @@
from __future__ import annotations
-from typing import TYPE_CHECKING, ClassVar
+from typing import TYPE_CHECKING, ClassVar, final
+from cyberdrop_dl.crawlers import Registry
from cyberdrop_dl.crawlers.crawler import Crawler, SupportedPaths
from cyberdrop_dl.url_objects import AbsoluteHttpURL
from cyberdrop_dl.utils import css
@@ -11,22 +12,24 @@ if TYPE_CHECKING:
from cyberdrop_dl.url_objects import ScrapeItem
+@final
class Selector:
GALLERY_TITLE = "a.link h2"
GALLERY_IMAGES = "div.images a img"
IMAGE = "img.image-img"
class PixHostCrawler(Crawler):
SUPPORTED_PATHS: ClassVar[SupportedPaths] = {
"Gallery": "/gallery/<gallery_id>",
"Image": "/show/<image_id>",
"Thumbnail": "/thumbs/..",
}
- PRIMARY_URL: ClassVar[AbsoluteHttpURL] = AbsoluteHttpURL("https://pixhost.to")
+ PRIMARY_URL: ClassVar[AbsoluteHttpURL] = AbsoluteHttpURL("https://pixhost.cc")
DOMAIN: ClassVar[str] = "pixhost"
FOLDER_DOMAIN: ClassVar[str] = "PixHost"
- OLD_DOMAINS: ClassVar[tuple[str, ...]] = ("pixhost.org",)
+ OLD_DOMAINS: ClassVar[tuple[str, ...]] = ("pixhost.org", "pixhost.to")
async def fetch(self, scrape_item: ScrapeItem) -> None:
match scrape_item.url.parts[1:]:
diff --git a/tests/crawlers/test_cases/pixhost.py b/tests/crawlers/test_cases/pixhost.py
index c562ad407..b012f6d33 100644
--- a/tests/crawlers/test_cases/pixhost.py
+++ b/tests/crawlers/test_cases/pixhost.py
@@ -1,34 +1,34 @@
DOMAIN = "pixhost"
TEST_CASES = [
{
- "url": "https://pixhost.to/show/491/538303562_035.jpg",
+ "url": "https://pixhost.cc/show/491/538303562_035.jpg",
"results": [
{
- "url": "https://img100.pixhost.to/images/491/538303562_035.jpg",
+ "url": "https://img100.pixhost.cc/images/491/538303562_035.jpg",
"filename": "538303562_035.jpg",
- "referer": "https://pixhost.to/show/491/538303562_035.jpg",
+ "referer": "https://pixhost.cc/show/491/538303562_035.jpg",
"album_id": None,
}
],
},
{
- "url": "https://t100.pixhost.to/thumbs/491/538303428_001.jpg",
+ "url": "https://t100.pixhost.cc/thumbs/491/538303428_001.jpg",
"results": [
{
- "url": "https://img100.pixhost.to/images/491/538303428_001.jpg",
+ "url": "https://img100.pixhost.cc/images/491/538303428_001.jpg",
"filename": "538303428_001.jpg",
- "referer": "https://pixhost.to/show/491/538303428_001.jpg",
+ "referer": "https://pixhost.cc/show/491/538303428_001.jpg",
"album_id": None,
}
],
},
{
- "url": "https://pixhost.to/gallery/pgv5s",
+ "url": "https://pixhost.cc/gallery/pgv5s",
"results": [
{
- "url": "https://img31.pixhost.to/images/183/107062500_instasave.jpg",
+ "url": "https://img31.pixhost.cc/images/183/107062500_instasave.jpg",
"filename": "107062500_instasave.jpg",
- "referer": "https://pixhost.to/show/183/107062500_instasave.jpg",
+ "referer": "https://pixhost.cc/gallery/pgv5s",
"album_id": "pgv5s",
"download_path": "re:Untitled Gallery",
}
@@ -36,12 +36,12 @@ TEST_CASES = [
"count": 7,
},
{
- "url": "https://img0.pixhost.to/images/647/527555752_clips4sale-com-2023-09-29-angel-the-dreamgirl-her-horniness-and-lust-can.jpg",
+ "url": "https://img0.pixhost.cc/images/647/527555752_clips4sale-com-2023-09-29-angel-the-dreamgirl-her-horniness-and-lust-can.jpg",
"results": [
{
- "url": "https://img0.pixhost.to/images/647/527555752_clips4sale-com-2023-09-29-angel-the-dreamgirl-her-horniness-and-lust-can.jpg",
+ "url": "https://img0.pixhost.cc/images/647/527555752_clips4sale-com-2023-09-29-angel-the-dreamgirl-her-horniness-and-lust-can.jpg",
"filename": "527555752_clips4sale-com-2023-09-29-angel-the-dreamgirl-her-horniness-and-lust-can.jpg",
- "referer": "https://img0.pixhost.to/images/647/527555752_clips4sale-com-2023-09-29-angel-the-dreamgirl-her-horniness-and-lust-can.jpg",
+ "referer": "https://img0.pixhost.cc/images/647/527555752_clips4sale-com-2023-09-29-angel-the-dreamgirl-her-horniness-and-lust-can.jpg",
}
],
},