Skip to content

Commit

Permalink
Merge pull request #2082 from feederbox826/pumps-heels
Browse files Browse the repository at this point in the history
manually replace mentions of Pumps with Women's Heels
  • Loading branch information
feederbox826 authored Oct 29, 2024
2 parents c42f3a4 + 3058748 commit bac52eb
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion scrapers/Teamskeet/TeamskeetAPI.py
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,14 @@ def save_json(api_json, url):
date = datetime.strptime(dt, '%Y-%m-%d')
scrape['date'] = str(date.date())

# replace tags manually
tags = scene_api_json.get('tags')
if tags:
for i, tag in enumerate(tags):
# inconsistent use on TeamSkeet since it was added as a tag
if tag == "Pumps":
tags[i] = "Woman's Heels"

#fix for TeamKseet including HTML tags in Description
CLEANR = re.compile('<.*?>')
cleandescription = re.sub(CLEANR,'',scene_api_json.get('description'))
Expand All @@ -218,7 +226,7 @@ def save_json(api_json, url):
studioApiName = scene_api_json['site'].get('name')
log.debug("Studio API name is '" + studioApiName + "'")
scrape['studio']['name'] = studioMap[studioApiName] if studioApiName in studioMap else studioApiName
scrape['tags'] = [{"name": x} for x in scene_api_json.get('tags')]
scrape['tags'] = [{"name": x} for x in tags]
scrape['code'] = scene_api_json.get('cId', '').split('/')[-1]
for tag in studioDefaultTags.get(studioApiName, []):
log.debug("Assiging default tags - " + tag)
Expand Down

0 comments on commit bac52eb

Please sign in to comment.