This commit is contained in:
Christoph Califice
2025-10-09 20:05:31 -03:00
parent ed22ef22bc
commit 0a5f88d75a
1442 changed files with 101562 additions and 0 deletions

View File

@@ -0,0 +1,77 @@
import json
import sys
from typing import Any
from py_common import log
from py_common.util import dig, replace_all
from AyloAPI.scrape import (
gallery_from_url,
scraper_args,
scene_from_url,
scene_search,
scene_from_fragment,
performer_from_url,
performer_from_fragment,
performer_search,
movie_from_url,
)
def fakehub(obj: Any, _) -> Any:
replacement = None
match dig(obj, "studio", "name"):
case "Fake Hostel":
replacement = "fakehostel.com"
case "Fake Taxi":
replacement = "faketaxi.com"
case "Public Agent":
replacement = "publicagent.com"
case _:
replacement = "fakehub.com"
# All FakeHub performer URLs use /modelprofile/ instead of the standard /model/
# and some studios have their own domains
fixed = replace_all(
obj,
"url",
lambda x: x.replace("/model/", "/modelprofile/").replace(
"fakehub.com", replacement
),
)
return fixed
if __name__ == "__main__":
domains = [
"fakehub",
"fakehostel",
"faketaxi",
"publicagent",
]
op, args = scraper_args()
result = None
match op, args:
case "gallery-by-url" | "gallery-by-fragment", {"url": url} if url:
result = gallery_from_url(url, postprocess=fakehub)
case "scene-by-url", {"url": url} if url:
result = scene_from_url(url, postprocess=fakehub)
case "scene-by-name", {"name": name} if name:
result = scene_search(name, search_domains=domains, postprocess=fakehub)
case "scene-by-fragment" | "scene-by-query-fragment", args:
result = scene_from_fragment(
args, search_domains=domains, postprocess=fakehub
)
case "performer-by-url", {"url": url}:
result = performer_from_url(url, postprocess=fakehub)
case "performer-by-fragment", args:
result = performer_from_fragment(args)
case "performer-by-name", {"name": name} if name:
result = performer_search(name, search_domains=domains, postprocess=fakehub)
case "movie-by-url", {"url": url} if url:
result = movie_from_url(url, postprocess=fakehub)
case _:
log.error(f"Operation: {op}, arguments: {json.dumps(args)}")
sys.exit(1)
print(json.dumps(result))

View File

@@ -0,0 +1,89 @@
name: FakeHub
# requires: py_common, AyloAPI
# scrapes: Fake Agent, Fake Agent UK, Fake Cop, Fake Driving School, Fake Hospital, Fake Hostel, Fake Taxi, Fakehub Originals, Female Agent, Female Fake Taxi, Public Agent
galleryByURL:
- action: script
url:
- fakehub.com/scene/
- fakehostel.com/scene/
- faketaxi.com/scene/
- publicagent.com/scene/
script:
- python
- FakeHub.py
- gallery-by-url
galleryByFragment:
action: script
script:
- python
- FakeHub.py
- gallery-by-fragment
sceneByURL:
- action: script
url:
- fakehub.com/scene/
- fakehostel.com/scene/
- faketaxi.com/scene/
- publicagent.com/scene/
script:
- python
- FakeHub.py
- scene-by-url
sceneByFragment:
action: script
script:
- python
- FakeHub.py
- scene-by-fragment
sceneByName:
action: script
script:
- python
- FakeHub.py
- scene-by-name
sceneByQueryFragment:
action: script
script:
- python
- FakeHub.py
- scene-by-query-fragment
performerByName:
action: script
script:
- python
- FakeHub.py
- performer-by-name
performerByURL:
- action: script
url:
- fakehub.com/modelprofile/
- fakehostel.com/modelprofile/
- faketaxi.com/modelprofile/
- publicagent.com/modelprofile/
script:
- python
- FakeHub.py
- performer-by-url
performerByFragment:
action: script
script:
- python
- FakeHub.py
- performer-by-fragment
movieByURL:
- action: script
url:
- fakehub.com/movie/
- fakehostel.com/movie/
- faketaxi.com/movie/
- publicagent.com/movie/
# Since scenes link to the movie we can scrape movies from scenes
- fakehub.com/scene/
- fakehostel.com/scene/
- faketaxi.com/scene/
- publicagent.com/scene/
script:
- python
- FakeHub.py
- movie-by-url
# Last Updated January 14, 2024

View File

@@ -0,0 +1,10 @@
id: FakeHub
name: FakeHub
metadata: {}
version: c2abfdf
date: "2024-02-03 17:45:33"
requires: []
source_repository: https://stashapp.github.io/CommunityScrapers/stable/index.yml
files:
- FakeHub.yml
- FakeHub.py