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,85 @@
import json
import sys
from typing import Any
from py_common import log
from py_common.util import dig, replace_all, replace_at
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,
)
studio_map = {
"tp": "TwinkPop",
"Men": "Men.com",
}
def men(obj: Any, _) -> Any:
fixed = replace_at(
obj, "studio", "name", replacement=lambda x: studio_map.get(x, x)
)
fixed = replace_at(
fixed, "studio", "parent", "name", replacement=lambda x: studio_map.get(x, x)
)
# TwinkPop is the only special case for now
is_twinkpop = dig(fixed, "studio", "name") == "TwinkPop"
scene = "/scene/" if is_twinkpop else "/sceneid/"
model = "/pornstar/" if is_twinkpop else "/modelprofile/"
domain = "twinkpop.com" if is_twinkpop else "men.com"
fixed = replace_all(
fixed,
"url",
lambda x: x.replace("/scene/", scene)
.replace("/model/", model)
.replace("men.com", domain),
)
return fixed
if __name__ == "__main__":
domains = [
"men",
"bigdicksatschool",
"godsofmen",
"jizzorgy",
"menofuk",
"str8togay",
"thegayoffice",
"toptobottom",
"twinkpop",
]
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=men)
case "scene-by-url", {"url": url} if url:
result = scene_from_url(url, postprocess=men)
case "scene-by-name", {"name": name} if name:
result = scene_search(name, search_domains=domains, postprocess=men)
case "scene-by-fragment" | "scene-by-query-fragment", args:
result = scene_from_fragment(args, search_domains=domains, postprocess=men)
case "performer-by-url", {"url": url}:
result = performer_from_url(url, postprocess=men)
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=men)
case "movie-by-url", {"url": url} if url:
result = movie_from_url(url, postprocess=men)
case _:
log.error(f"Operation: {op}, arguments: {json.dumps(args)}")
sys.exit(1)
print(json.dumps(result))

View File

@@ -0,0 +1,113 @@
name: Men.com
# requires: py_common, AyloAPI
# scrapes: Big Dicks At School, Drill My Hole, Gods of Men, Jizz Orgy, Men of UK, Men.com, Str8 to Gay, The Gay Office, Top to Bottom, TwinkPop
galleryByURL:
- action: script
url: &sceneUrls
- \/men.com/scene
- www.men.com/scene
- mennetwork.com/scene
- bigdicksatschool.com/scene/
- godsofmen.com/scene/
- jizzorgy.com/scene/
- menofuk.com/scene/
- str8togay.com/scene/
- thegayoffice.com/scene/
- toptobottom.com/scene/
- twinkpop.com/video/
script:
- python
- Men.py
- gallery-by-url
galleryByFragment:
action: script
script:
- python
- Men.py
- gallery-by-fragment
sceneByURL:
- action: script
url: *sceneUrls
script:
- python
- Men.py
- scene-by-url
sceneByFragment:
action: script
script:
- python
- Men.py
- scene-by-fragment
sceneByName:
action: script
script:
- python
- Men.py
- scene-by-name
sceneByQueryFragment:
action: script
script:
- python
- Men.py
- scene-by-query-fragment
performerByName:
action: script
script:
- python
- Men.py
- performer-by-name
performerByURL:
- action: script
url:
- \/men.com/modelprofile/
- www.men.com/modelprofile/
- mennetwork.com/modelprofile/
- bigdicksatschool.com/model/
- godsofmen.com/model/
- jizzorgy.com/model/
- menofuk.com/model/
- str8togay.com/model/
- thegayoffice.com/model/
- toptobottom.com/model/
- twinkpop.com/pornstar/
script:
- python
- Men.py
- performer-by-url
performerByFragment:
action: script
script:
- python
- Men.py
- performer-by-fragment
movieByURL:
- action: script
url:
- \/men.com/movie
- www.men.com/movie/
- mennetwork.com/movie
- bigdicksatschool.com/movie/
- godsofmen.com/movie/
- jizzorgy.com/movie/
- menofuk.com/movie/
- str8togay.com/movie/
- thegayoffice.com/movie/
- toptobottom.com/movie/
- twinkpop.com/movie/
# Since scenes link to the movie we can scrape movies from scenes
- \/men.com/scene
- www.men.com/scene
- mennetwork.com/scene
- bigdicksatschool.com/scene/
- godsofmen.com/scene/
- jizzorgy.com/scene/
- menofuk.com/scene/
- str8togay.com/scene/
- thegayoffice.com/scene/
- toptobottom.com/scene/
- twinkpop.com/video/
script:
- python
- Men.py
- movie-by-url
# Last Updated January 14, 2024

View File

@@ -0,0 +1,10 @@
id: Men
name: Men.com
metadata: {}
version: 68b9096
date: "2024-02-07 11:19:49"
requires: []
source_repository: https://stashapp.github.io/CommunityScrapers/stable/index.yml
files:
- Men.py
- Men.yml