Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Various Scrapers #1849

Merged
merged 7 commits into from
Oct 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion Contents/Code/PAsiteList.py
Original file line number Diff line number Diff line change
Expand Up @@ -1848,6 +1848,7 @@
1754: ('MilfAF', 'https://www.milfaf.com', '/models/'),
1755: ('Shady Spa', 'https://www.shadyspa.com', '/models/'),
1756: ('Breed Me', 'https://www.breedme.com', '/models/'),
1757: ('MrLuckyRAW', 'https://www.mrluckyraw.com', '/search.php?query='),
}

abbreviations = (
Expand Down Expand Up @@ -2318,7 +2319,7 @@ def getProviderFromSiteNum(siteNum):
provider = network1service

# Spizoo
elif siteNum == 293 or (571 <= siteNum <= 577) or (1374 <= siteNum <= 1375):
elif siteNum == 293 or (571 <= siteNum <= 577) or (1374 <= siteNum <= 1375) or siteNum == 1757:
provider = siteSpizoo

# Private
Expand Down
13 changes: 7 additions & 6 deletions Contents/Code/PAutils.py
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,8 @@ def parseTitleSymbol(word, siteNum, symbol):


def postParseTitle(output):
replace = [('“', '\"'), ('”', '\"'), ('’', '\''), ('W/', 'w/'), ('Aj', 'AJ')]
replace = [(r'“', '\"'), (r'”', '\"'), (r'’', '\''), (r'W/', 'w/'), (r'A\.\sJ\.', 'A.J.'), (r'T\.\sJ\.', 'T.J.'), (r'(?<!\S)AJ(?!\S)', 'A.J.')]
lower_exceptions = ['a', 'y', 'n', 'an', 'of', 'the', 'and', 'for', 'to', 'onto', 'but', 'or', 'nor', 'at', 'with', 'vs', 'com', 'co', 'org']

# Add space after a punctuation if missing
output = re.sub(r'(?=[\!|\:|\?|\.](?=(\w{2,}))\b)\S(?!(co\b|net\b|com\b|org\b|porn\b|E\d|xxx\b))', lambda m: m.group(0) + ' ', output, flags=re.IGNORECASE)
Expand All @@ -398,9 +399,9 @@ def postParseTitle(output):
# Remove space between punctuation and word
output = re.sub(r'(?<=[#\(])\s+', '', output)
# Override lowercase if word follows a punctuation
output = re.sub(ur'(?<=!|:|\?|\.|-|\u2013)(\s)(\S)', lambda m: m.group(1) + m.group(2).upper(), output)
output = re.sub(ur'(?<!vs\.)(?<=!|:|\?|\.|-|\u2013)(\s)(\S)', lambda m: m.group(1) + m.group(2).upper(), output)
# Override lowercase if word follows a parenthesis
output = re.sub(r'(?<=[\(|\&|\"|\[|\*|\~])(\w)', lambda m: m.group(0).upper() + m.group(1)[1:], output)
output = re.sub(r'(?<=[\(|\&|\"|\[|\*|\~])(\w)', lambda m: m.group(0).upper() + m.group(1)[1:] if m.group(1).lower() not in lower_exceptions else m.group(1), output)
# Override lowercase if last word in section
output = re.sub(r'\S+[\]\)\"\~\:]', lambda m: m.group(0)[0].capitalize() + m.group(0)[1:], output)
# Override lowercase if last word
Expand Down Expand Up @@ -440,14 +441,14 @@ def manualWordFix(word):
exceptions = (
'im', 'theyll', 'cant', 'ive', 'shes', 'theyre', 'tshirt', 'dont', 'wasnt', 'youre', 'ill', 'whats', 'didnt',
'isnt', 'senor', 'senorita', 'thats', 'gstring', 'milfs', 'oreilly', 'bangbros', 'bday', 'dms', 'bffs',
'ohmy', 'wont', 'whos', 'shouldnt'
'ohmy', 'wont', 'whos', 'shouldnt', 'lasirena'
)
corrections = (
'I\'m', 'They\'ll', 'Can\'t', 'I\'ve', 'She\'s', 'They\'re', 'T-Shirt', 'Don\'t', 'Wasn\'t', 'You\'re', 'I\'ll', 'What\'s', 'Didn\'t',
'Isn\'t', 'Señor', 'Señorita', 'That\'s', 'G-String', 'MILFs', 'O\'Reilly', 'BangBros', 'B-Day', 'DMs', 'BFFs',
'OhMy', 'Won\'t', 'Who\'s', 'Shouldn\'t'
'OhMy', 'Won\'t', 'Who\'s', 'Shouldn\'t', 'LaSirena'
)
pattern = re.compile(r'\W')
pattern = re.compile(r'\d|\W')
cleanWord = re.sub(pattern, '', word)

if cleanWord.lower() in exceptions:
Expand Down
2 changes: 1 addition & 1 deletion Contents/Code/networkLoveHerFilms.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ def search(results, lang, siteNum, searchData):
else:
score = 100 - Util.LevenshteinDistance(searchData.title.lower(), titleNoFormatting.lower())

results.Append(MetadataSearchResult(id='%s|%d' % (curID, siteNum), name='%s [Love Her Feet] %s' % (titleNoFormatting, releaseDate), score=score, lang=lang))
results.Append(MetadataSearchResult(id='%s|%d' % (curID, siteNum), name='%s [%s] %s' % (titleNoFormatting, PAsearchSites.getSearchSiteName(siteNum), releaseDate), score=score, lang=lang))

return results

Expand Down
2 changes: 1 addition & 1 deletion Contents/Code/networkTeamSkeet.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ def update(metadata, lang, siteNum, movieGenres, movieActors, art):

genres.append(genreName)

genres.extend(PAutils.getDictValuesFromKey(genresDB, subSite))
genres.extend(PAutils.getDictValuesFromKey(genresDB, tagline))

for genreLink in genres:
genreName = genreLink
Expand Down
1 change: 1 addition & 0 deletions Contents/Code/siteATKGirlfriends.py
Original file line number Diff line number Diff line change
Expand Up @@ -491,6 +491,7 @@ def getSceneInfo(searchTitle):
'Rebecca Vanguard': 'sai003',
'Reese Robbins': 'ree012',
'Reina Heart': 'rei001',
'Renee Rose': 'ren057',
'Renee Roulette': 'ren055',
'Rhaya Shyne': 'rha001',
'Rikki Rumor': 'rik006',
Expand Down
2 changes: 1 addition & 1 deletion Contents/Code/siteMomComesFirst.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,5 +95,5 @@ def update(metadata, lang, siteNum, movieGenres, movieActors, art):
'cory chase', 'abby somers', 'bailey base', 'kiki klout', 'victoria june', 'kendra heart', 'archie stone', 'jaime vine',
'casca akashova', 'katie monroe', 'eve rebel', 'dakota burns', 'nikita reznikova', 'taylor blake', 'tricia oaks', 'artemisia love',
'kyla keys', 'brianna rose', 'jordan max', 'jadan snow', 'kaylynn keys', 'lucy sunflower', 'jackie hoff', 'kenzie foxx',
'mirabella amore', 'heather vahn', 'natasha nice'
'mirabella amore', 'heather vahn', 'natasha nice', 'kat marie', 'miss brat', 'macy meadows', 'sydney paige', 'vanessa cage',
}
8 changes: 5 additions & 3 deletions Contents/Code/siteNewSensations.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ def search(results, lang, siteNum, searchData):
try:
searchResult = HTML.ElementFromString(req.text)

titleNoFormatting = searchResult.xpath('(//div[@class="indScene"]/h1 | //div[@class="indSceneDVD"]/h1) | (//div[@class="indScene"]/h2 | //div[@class="indSceneDVD"]/h2)')[0].text_content().strip()
title = searchResult.xpath('(//div[@class="indScene"]/h1 | //div[@class="indSceneDVD"]/h1) | (//div[@class="indScene"]/h2 | //div[@class="indSceneDVD"]/h2)')[0].text_content().strip()
titleNoFormatting = PAutils.parseTitle(title, siteNum)
curID = PAutils.Encode(sceneURL)

score = 100 - Util.LevenshteinDistance(searchData.title.lower(), titleNoFormatting.lower())
Expand Down Expand Up @@ -55,7 +56,8 @@ def update(metadata, lang, siteNum, movieGenres, movieActors, art):

if sceneType == 'Scene':
# Title
metadata.title = detailsPageElements.xpath('//div[@class="indScene"]/h1 | //div[@class="indScene"]/h2')[0].text_content().strip()
title = detailsPageElements.xpath('//div[@class="indScene"]/h1 | //div[@class="indScene"]/h2')[0].text_content().strip()
metadata.title = PAutils.parseTitle(title, siteNum)

# Summary
metadata.summary = detailsPageElements.xpath('//div[@class="description"]/h2/text() | //div[@class="description"]//span/following-sibling::text()')[0].replace('Description:', '').strip()
Expand Down Expand Up @@ -90,7 +92,7 @@ def update(metadata, lang, siteNum, movieGenres, movieActors, art):
else:
# Title
title = detailsPageElements.xpath('//div[@class="indSceneDVD"]/h1')[0].text_content().strip()
metadata.title = title
metadata.title = PAutils.parseTitle(title, siteNum)

# Summary
metadata.summary = detailsPageElements.xpath('//div[@class="description"]/h2')[0].text_content().replace('Description:', '').strip()
Expand Down
11 changes: 5 additions & 6 deletions Contents/Code/siteSpizoo.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,8 @@ def update(metadata, lang, siteNum, movieGenres, movieActors, art):
try:
tagline = detailsPageElements.xpath('//i[@id="site"]/@value')[0].strip()
except:
if 'rawattack' in sceneURL:
tagline = 'Raw Attack'
else:
tagline = 'Spizoo'
if 'Spizoo' not in PAsearchSites.getSearchSiteName(siteNum):
tagline = PAsearchSites.getSearchSiteName(siteNum)
metadata.tagline = tagline
metadata.collections.add(tagline)

Expand Down Expand Up @@ -104,7 +102,8 @@ def update(metadata, lang, siteNum, movieGenres, movieActors, art):

# Posters
xpaths = [
'//section[@id="photos-tour"]//img[contains(@class, "update_thumb thumbs")]/@src'
'//section[@id="photos-tour"]//img[contains(@class, "update_thumb thumbs")]/@src',
'//div[@class="content-block-video"]//img/@alt'
]

for xpath in xpaths:
Expand Down Expand Up @@ -141,5 +140,5 @@ def update(metadata, lang, siteNum, movieGenres, movieActors, art):

xPathDB = {
('293', '571', '572', '573', '574', '575', '576', '1374'): ['.//div[./h4[contains(., "date")]]/text()'],
'577': ['.//div[./h4[contains(., "date")]]/p/text()']
('577', '1757'): ['.//div[./h4[contains(., "date")]]/p/text()']
}
1 change: 1 addition & 0 deletions docs/sitelist.md
Original file line number Diff line number Diff line change
Expand Up @@ -1297,6 +1297,7 @@ If you're having difficulty finding the SceneID, double-check [PAsiteList.py](..
- IntimateLesbians
- JessicaJaymesXXX
- MrLuckyPOV
- MrLuckyRAW
- PornGoesPro
- PornstarTease
- RawAttack
Expand Down