Skip to content

Commit

Permalink
Merge pull request #16 from gimmeliina/teamskeet
Browse files Browse the repository at this point in the history
Teamskeet
  • Loading branch information
gimmeliina authored Dec 29, 2023
2 parents 312a5b8 + fc0dc8b commit 0a996c1
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 38 deletions.
2 changes: 1 addition & 1 deletion SCRAPERS-LIST.md
Original file line number Diff line number Diff line change
Expand Up @@ -1265,7 +1265,7 @@ samuelotoole.com|Algolia_NextDoorStudios.yml|:heavy_check_mark:|:heavy_check_mar
sapphicerotica.com|sapphix.yml|:heavy_check_mark:|:x:|:x:|:x:|-|-
sapphix.com|sapphix.yml|:heavy_check_mark:|:x:|:x:|:x:|-|-
sarajay.com|VNAGirls.yml|:heavy_check_mark:|:x:|:x:|:x:|-|-
sayuncle.com|Sayuncle.yml|:heavy_check_mark:|:x:|:x:|:x:|-|Gay
sayuncle.com|Teamskeet.yml|:heavy_check_mark:|:x:|:x:|:x:|Python|-Gay
scarybigdicks.com|Hustler.yml|:heavy_check_mark:|:x:|:x:|:x:|CDP|-
schoolgirlshd.com|Jhdv.yml|:heavy_check_mark:|:x:|:x:|:x:|-|JAV Uncensored
schoolpov.com|ItsPOV.yml|:heavy_check_mark:|:x:|:x:|:x:|CDP|-
Expand Down
30 changes: 0 additions & 30 deletions scrapers/Algolia_ChaosMen.yml

This file was deleted.

3 changes: 2 additions & 1 deletion scrapers/Teamskeet/Teamskeet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@ name: "TeamskeetAPI"

sceneByURL:
- url:
- sayuncle.com/movies/
- teamskeet.com/movies/
action: script
script:
- python
- TeamskeetAPI.py
#- logJSON # Save the JSON from the API to a file
# Last Updated February 28, 2022
# Last Updated December 29, 2023
25 changes: 19 additions & 6 deletions scrapers/Teamskeet/TeamskeetAPI.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,18 +48,28 @@ def save_json(api_json, url):
# Not necessary but why not ?
USER_AGENT = 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:79.0) Gecko/20100101 Firefox/79.0'


fragment = json.loads(sys.stdin.read())
if fragment["url"]:
scene_url = fragment["url"]
else:
log.error('You need to set the URL (e.g. teamskeet.com/movies/*****)')
sys.exit(1)

if "teamskeet.com/movies/" not in scene_url:
log.error('The URL is not from a Teamskeet URL (e.g. teamskeet.com/movies/*****)')
if "sayuncle.com/movies/" not in scene_url and "teamskeet.com/movies/" not in scene_url:
log.error('The URL is not from a Teamskeet or SayUncle URL (e.g. teamskeet.com/movies/*****)')
sys.exit(1)

# Check the URL and set the API URL
if 'sayuncle.com' in scene_url:
ORIGIN = 'https://www.sayuncle.com'
REFERER = 'https://www.sayuncle.com/'
API_BASE = 'https://store2.psmcdn.net/sau-elastic-00gy5fg5ra-videoscontent/_doc/'
if 'teamskeet.com' in scene_url:
ORIGIN = 'https://www.teamskeet.com'
REFERER = 'https://www.teamskeet.com/'
API_BASE = 'https://store2.psmcdn.net/ts-elastic-d5cat0jl5o-videoscontent/_doc/'


scene_id = re.sub('.+/', '', scene_url)
if not scene_id:
log.error("Error with the ID ({})\nAre you sure that the end of your URL is correct ?".format(scene_id))
Expand All @@ -73,11 +83,11 @@ def save_json(api_json, url):
scene_api_json = json.load(json_file)
else:
log.debug("Asking the API...")
api_url = f"https://store2.psmcdn.net/ts-elastic-d5cat0jl5o-videoscontent/_doc/{scene_id}"
api_url = f"{API_BASE}{scene_id}"
headers = {
'User-Agent': USER_AGENT,
'Origin': 'https://www.teamskeet.com',
'Referer': 'https://www.teamskeet.com/'
'Origin': ORIGIN,
'Referer': REFERER
}
scraper = cloudscraper.create_scraper()
# Send to the API
Expand Down Expand Up @@ -121,6 +131,9 @@ def save_json(api_json, url):
scrape['performers'] = [{"name": x.get('modelName')}
for x in scene_api_json.get('models')]
scrape['tags'] = [{"name": x} for x in scene_api_json.get('tags')]
# If the scene is from sayuncle.com, we need to add the gay tag to the tags list
if 'sayuncle.com' in scene_url:
scrape['tags'].append({"name": "Gay"})
scrape['image'] = scene_api_json.get('img')

if use_local == 0:
Expand Down

0 comments on commit 0a996c1

Please sign in to comment.