stash
This commit is contained in:
80
stash/config/scrapers/community/Brazzers/Brazzers.py
Normal file
80
stash/config/scrapers/community/Brazzers/Brazzers.py
Normal file
@@ -0,0 +1,80 @@
|
||||
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 = {
|
||||
"JugFuckers": "Jug Fuckers",
|
||||
"Shes Gonna Squirt": "She's Gonna Squirt",
|
||||
}
|
||||
|
||||
|
||||
def bangbros(obj: Any, _) -> Any:
|
||||
# All brazzers URLs use /video/ instead of the standard /scene/
|
||||
# and /pornstar/ instead of the standard /model
|
||||
fixed = replace_all(
|
||||
obj,
|
||||
"url",
|
||||
lambda x: x.replace("/scene/", "/video/").replace("/model/", "/pornstar/"),
|
||||
)
|
||||
|
||||
# Rename certain studios according to the map
|
||||
fixed = replace_at(
|
||||
fixed, "studio", "name", replacement=lambda x: studio_map.get(x, x)
|
||||
)
|
||||
|
||||
# Brazzers Live special case: if the scene has the tag "Brazzers Live" we need to set the studio name to "Brazzers Live"
|
||||
if any(t["name"] == "Brazzers Live" for t in dig(obj, "tags", default=[])):
|
||||
fixed = replace_at(
|
||||
fixed, "studio", "name", replacement=lambda _: "Brazzers Live"
|
||||
)
|
||||
|
||||
return fixed
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
domains = [
|
||||
"brazzers",
|
||||
"brazzersnetwork",
|
||||
]
|
||||
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=bangbros)
|
||||
case "scene-by-url", {"url": url} if url:
|
||||
result = scene_from_url(url, postprocess=bangbros)
|
||||
case "scene-by-name", {"name": name} if name:
|
||||
result = scene_search(name, search_domains=domains, postprocess=bangbros)
|
||||
case "scene-by-fragment" | "scene-by-query-fragment", args:
|
||||
result = scene_from_fragment(
|
||||
args, search_domains=domains, postprocess=bangbros
|
||||
)
|
||||
case "performer-by-url", {"url": url}:
|
||||
result = performer_from_url(url, postprocess=bangbros)
|
||||
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=bangbros
|
||||
)
|
||||
case "movie-by-url", {"url": url} if url:
|
||||
result = movie_from_url(url, postprocess=bangbros)
|
||||
case _:
|
||||
log.error(f"Operation: {op}, arguments: {json.dumps(args)}")
|
||||
sys.exit(1)
|
||||
|
||||
print(json.dumps(result))
|
||||
76
stash/config/scrapers/community/Brazzers/Brazzers.yml
Normal file
76
stash/config/scrapers/community/Brazzers/Brazzers.yml
Normal file
@@ -0,0 +1,76 @@
|
||||
name: Brazzers
|
||||
# requires: py_common, AyloAPI
|
||||
# scrapes: Asses in Public, Baby Got Boobs, Big Butts Like It Big, Big Tits at School, Big Tits at Work, Big Tits In Sports, Big Tits In Uniform, Big Wet Butts, BrazzersExxtra, Brazzers Live, Brazzers Vault, Busty & Real, Bustyz, CFNM, Day With A Pornstar, Dirty Masseur, Doctor Adventures, Hot And Mean, Hot Chicks Big Asses, JugFuckers, Milfs Like It Big, Mommy Got Boobs, Moms in control, Pornstars Like it Big, Real Wife Stories, Shes Gonna Squirt, Teens Like It Big, ZZ Series
|
||||
galleryByURL:
|
||||
- action: script
|
||||
url:
|
||||
- brazzers.com/video
|
||||
- brazzersnetwork.com/video
|
||||
script:
|
||||
- python
|
||||
- Brazzers.py
|
||||
- gallery-by-url
|
||||
galleryByFragment:
|
||||
action: script
|
||||
script:
|
||||
- python
|
||||
- Brazzers.py
|
||||
- gallery-by-fragment
|
||||
sceneByURL:
|
||||
- action: script
|
||||
url:
|
||||
- brazzers.com/video
|
||||
- brazzersnetwork.com/video
|
||||
script:
|
||||
- python
|
||||
- Brazzers.py
|
||||
- scene-by-url
|
||||
sceneByFragment:
|
||||
action: script
|
||||
script:
|
||||
- python
|
||||
- Brazzers.py
|
||||
- scene-by-fragment
|
||||
sceneByName:
|
||||
action: script
|
||||
script:
|
||||
- python
|
||||
- Brazzers.py
|
||||
- scene-by-name
|
||||
sceneByQueryFragment:
|
||||
action: script
|
||||
script:
|
||||
- python
|
||||
- Brazzers.py
|
||||
- scene-by-query-fragment
|
||||
performerByName:
|
||||
action: script
|
||||
script:
|
||||
- python
|
||||
- Brazzers.py
|
||||
- performer-by-name
|
||||
performerByURL:
|
||||
- action: script
|
||||
url:
|
||||
- brazzers.com/pornstar/
|
||||
- brazzersnetwork.com/pornstar/
|
||||
script:
|
||||
- python
|
||||
- Brazzers.py
|
||||
- performer-by-url
|
||||
performerByFragment:
|
||||
action: script
|
||||
script:
|
||||
- python
|
||||
- Brazzers.py
|
||||
- performer-by-fragment
|
||||
movieByURL:
|
||||
- action: script
|
||||
url:
|
||||
- brazzers.com/movie
|
||||
- brazzersnetwork.com/movie
|
||||
script:
|
||||
- python
|
||||
- Brazzers.py
|
||||
- movie-by-url
|
||||
# Last Updated January 14, 2024
|
||||
10
stash/config/scrapers/community/Brazzers/manifest
Executable file
10
stash/config/scrapers/community/Brazzers/manifest
Executable file
@@ -0,0 +1,10 @@
|
||||
id: Brazzers
|
||||
name: Brazzers
|
||||
metadata: {}
|
||||
version: c2abfdf
|
||||
date: "2024-02-03 17:45:33"
|
||||
requires: []
|
||||
source_repository: https://stashapp.github.io/CommunityScrapers/stable/index.yml
|
||||
files:
|
||||
- Brazzers.py
|
||||
- Brazzers.yml
|
||||
Reference in New Issue
Block a user