From fcb86ac13ec7208b124e7e893346e1712b257f47 Mon Sep 17 00:00:00 2001 From: diamondpete <87245367+diamondpete@users.noreply.github.com> Date: Wed, 6 Sep 2023 19:57:13 -0400 Subject: [PATCH] Move Dogfart to Gamma Ent Other --- Contents/Code/PAsiteList.py | 51 ++++++----- Contents/Code/networkDogfart.py | 119 -------------------------- Contents/Code/networkGammaEntOther.py | 4 +- 3 files changed, 28 insertions(+), 146 deletions(-) delete mode 100644 Contents/Code/networkDogfart.py diff --git a/Contents/Code/PAsiteList.py b/Contents/Code/PAsiteList.py index 44052682a..5a5ebb4b2 100644 --- a/Contents/Code/PAsiteList.py +++ b/Contents/Code/PAsiteList.py @@ -9,7 +9,6 @@ import networkFullPornNetwork import networkSteppedUp import networkGammaEnt -import networkDogfart import siteJulesJordan import networkPerfectGonzo import networkPornFidelity @@ -602,30 +601,30 @@ 405: ('Female Fake Taxi', 'https://www.fakehub.com', 'https://site-api.project1service.com'), 406: ('Fake Driving School', 'https://www.fakehub.com', 'https://site-api.project1service.com'), 407: ('Fake Hostel', 'https://www.fakehub.com', 'https://site-api.project1service.com'), - 408: ('Dogfart', 'https://www.dogfartnetwork.com', '/tour/search.php?search='), - 409: ('BlacksOnBlondes', 'https://www.dogfartnetwork.com', '/tour/search.php?search='), - 410: ('CuckoldSessions', 'https://www.dogfartnetwork.com', '/tour/search.php?search='), - 411: ('GloryHole', 'https://www.dogfartnetwork.com', '/tour/search.php?search='), - 412: ('BlacksOnCougars', 'https://www.dogfartnetwork.com', '/tour/search.php?search='), - 413: ('WeFuckBlackGirls', 'https://www.dogfartnetwork.com', '/tour/search.php?search='), - 414: ('WatchingMyMomGoBlack', 'https://www.dogfartnetwork.com', '/tour/search.php?search='), - 415: ('InterracialBlowbang', 'https://www.dogfartnetwork.com', '/tour/search.php?search='), - 416: ('CumBang', 'https://www.dogfartnetwork.com', '/tour/search.php?search='), - 417: ('InterracialPickups', 'https://www.dogfartnetwork.com', '/tour/search.php?search='), - 418: ('WatchingMyDaughterGoBlack', 'https://www.dogfartnetwork.com', '/tour/search.php?search='), - 419: ('ZebraGirls', 'https://www.dogfartnetwork.com', '/tour/search.php?search='), - 420: ('GloryHoleInitiations', 'https://www.dogfartnetwork.com', '/tour/search.php?search='), - 421: ('DogfartBehindTheScenes', 'https://www.dogfartnetwork.com', '/tour/search.php?search='), - 422: ('BlackMeatWhiteFeet', 'https://www.dogfartnetwork.com', '/tour/search.php?search='), - 423: ('SpringThomas', 'https://www.dogfartnetwork.com', '/tour/search.php?search='), - 424: ('KatieThomas', 'https://www.dogfartnetwork.com', '/tour/search.php?search='), - 425: ('RuthBlackwell', 'https://www.dogfartnetwork.com', '/tour/search.php?search='), - 426: ('CandyMonroe', 'https://www.dogfartnetwork.com', '/tour/search.php?search='), - 427: ('WifeWriting', 'https://www.dogfartnetwork.com', '/tour/search.php?search='), - 428: ('BarbCummings', 'https://www.dogfartnetwork.com', '/tour/search.php?search='), - 429: ('TheMinion', 'https://www.dogfartnetwork.com', '/tour/search.php?search='), - 430: ('BlacksOnBoys', 'https://www.dogfartnetwork.com', '/tour/search.php?search='), - 431: ('GloryholesAndHandjobs', 'https://www.dogfartnetwork.com', '/tour/search.php?search='), + 408: ('Dogfart', 'https://www.dogfartnetwork.com', 'https://tsmkfa364q-dsn.algolia.net/1/indexes/*/queries'), + 409: ('BlacksOnBlondes', 'https://www.dogfartnetwork.com', 'https://tsmkfa364q-dsn.algolia.net/1/indexes/*/queries'), + 410: ('CuckoldSessions', 'https://www.dogfartnetwork.com', 'https://tsmkfa364q-dsn.algolia.net/1/indexes/*/queries'), + 411: ('GloryHole', 'https://www.dogfartnetwork.com', 'https://tsmkfa364q-dsn.algolia.net/1/indexes/*/queries'), + 412: ('BlacksOnCougars', 'https://www.dogfartnetwork.com', 'https://tsmkfa364q-dsn.algolia.net/1/indexes/*/queries'), + 413: ('WeFuckBlackGirls', 'https://www.dogfartnetwork.com', 'https://tsmkfa364q-dsn.algolia.net/1/indexes/*/queries'), + 414: ('WatchingMyMomGoBlack', 'https://www.dogfartnetwork.com', 'https://tsmkfa364q-dsn.algolia.net/1/indexes/*/queries'), + 415: ('InterracialBlowbang', 'https://www.dogfartnetwork.com', 'https://tsmkfa364q-dsn.algolia.net/1/indexes/*/queries'), + 416: ('CumBang', 'https://www.dogfartnetwork.com', 'https://tsmkfa364q-dsn.algolia.net/1/indexes/*/queries'), + 417: ('InterracialPickups', 'https://www.dogfartnetwork.com', 'https://tsmkfa364q-dsn.algolia.net/1/indexes/*/queries'), + 418: ('WatchingMyDaughterGoBlack', 'https://www.dogfartnetwork.com', 'https://tsmkfa364q-dsn.algolia.net/1/indexes/*/queries'), + 419: ('ZebraGirls', 'https://www.dogfartnetwork.com', 'https://tsmkfa364q-dsn.algolia.net/1/indexes/*/queries'), + 420: ('GloryHoleInitiations', 'https://www.dogfartnetwork.com', 'https://tsmkfa364q-dsn.algolia.net/1/indexes/*/queries'), + 421: ('DogfartBehindTheScenes', 'https://www.dogfartnetwork.com', 'https://tsmkfa364q-dsn.algolia.net/1/indexes/*/queries'), + 422: ('BlackMeatWhiteFeet', 'https://www.dogfartnetwork.com', 'https://tsmkfa364q-dsn.algolia.net/1/indexes/*/queries'), + 423: ('SpringThomas', 'https://www.dogfartnetwork.com', 'https://tsmkfa364q-dsn.algolia.net/1/indexes/*/queries'), + 424: ('KatieThomas', 'https://www.dogfartnetwork.com', 'https://tsmkfa364q-dsn.algolia.net/1/indexes/*/queries'), + 425: ('RuthBlackwell', 'https://www.dogfartnetwork.com', 'https://tsmkfa364q-dsn.algolia.net/1/indexes/*/queries'), + 426: ('CandyMonroe', 'https://www.dogfartnetwork.com', 'https://tsmkfa364q-dsn.algolia.net/1/indexes/*/queries'), + 427: ('WifeWriting', 'https://www.dogfartnetwork.com', 'https://tsmkfa364q-dsn.algolia.net/1/indexes/*/queries'), + 428: ('BarbCummings', 'https://www.dogfartnetwork.com', 'https://tsmkfa364q-dsn.algolia.net/1/indexes/*/queries'), + 429: ('TheMinion', 'https://www.dogfartnetwork.com', 'https://tsmkfa364q-dsn.algolia.net/1/indexes/*/queries'), + 430: ('BlacksOnBoys', 'https://www.dogfartnetwork.com', 'https://tsmkfa364q-dsn.algolia.net/1/indexes/*/queries'), + 431: ('GloryholesAndHandjobs', 'https://www.dogfartnetwork.com', 'https://tsmkfa364q-dsn.algolia.net/1/indexes/*/queries'), 432: ('Jules Jordan', 'https://www.julesjordan.com', '/trial/search.php?query='), 433: ('DDFNetwork', 'https://ddfnetwork.com', '/videos/freeword/'), 434: ('Sandys Fantasies', 'https://ddfnetwork.com', '/videos/freeword/'), @@ -2324,7 +2323,7 @@ def getProviderFromSiteNum(siteNum): # DogfartNetwork elif (408 <= siteNum <= 431): - provider = networkDogfart + provider = networkGammaEntOther # FakeHub elif siteNum == 340 or (397 <= siteNum <= 407): diff --git a/Contents/Code/networkDogfart.py b/Contents/Code/networkDogfart.py deleted file mode 100644 index 5506cfbd1..000000000 --- a/Contents/Code/networkDogfart.py +++ /dev/null @@ -1,119 +0,0 @@ -import PAsearchSites -import PAutils - - -def search(results, lang, siteNum, searchData): - searchData.encoded = searchData.title.replace(' a ', ' ') - - req = PAutils.HTTPRequest(PAsearchSites.getSearchSearchURL(siteNum) + searchData.encoded) - searchResults = HTML.ElementFromString(req.text) - for searchResult in searchResults.xpath('//a[contains(@class, "thumbnail")]'): - titleNoFormatting = searchResult.xpath('.//h3[@class="scene-title"]')[0].text_content().strip() - sceneURL = searchResult.get('href').split('?')[0] - curID = PAutils.Encode(sceneURL) - releaseDate = searchData.dateFormat() if searchData.date else '' - fullSubSite = searchResult.xpath('.//div/p[@class="help-block"]')[0].text_content().strip() - - if 'BehindTheScenes' in fullSubSite and 'BTS' not in titleNoFormatting: - titleNoFormatting = titleNoFormatting + ' BTS' - subSite = fullSubSite.split('.com')[0] - - if subSite == PAsearchSites.getSearchSiteName(siteNum): - score = 100 - Util.LevenshteinDistance(searchData.title.lower(), titleNoFormatting.lower()) - else: - score = 60 - Util.LevenshteinDistance(searchData.title.lower(), titleNoFormatting.lower()) - - match = re.search(r'(?<=_)\d(?=\/)', sceneURL) - if match: - titleNoFormatting = '%s: Scene %s' % (titleNoFormatting, match.group(0)) - - results.Append(MetadataSearchResult(id='%s|%d|%s' % (curID, siteNum, releaseDate), name='%s [Dogfart/%s]' % (titleNoFormatting, subSite), score=score, lang=lang)) - - return results - - -def update(metadata, lang, siteNum, movieGenres, movieActors, art): - metadata_id = str(metadata.id).split('|') - sceneURL = PAutils.Decode(metadata_id[0]) - if not sceneURL.startswith('http'): - sceneURL = PAsearchSites.getSearchBaseURL(siteNum) + sceneURL - sceneDate = metadata_id[2] - req = PAutils.HTTPRequest(sceneURL) - detailsPageElements = HTML.ElementFromString(req.text) - - # Title - metadata.title = detailsPageElements.xpath('//div[@class="icon-container"]/a/@title')[0] - - # Summary - metadata.summary = detailsPageElements.xpath('//div[contains(@class, "description")]')[0].text_content().strip().replace('...read more', '').replace('\n', ' ') - - # Studio - metadata.studio = 'Dogfart Network' - - # Collections / Tagline - metadata.collections.clear() - tagline = detailsPageElements.xpath('//h3[@class="site-name"]')[0].text_content().strip() - metadata.tagline = tagline - metadata.collections.add(PAsearchSites.getSearchSiteName(siteNum)) - - # Release Date - date = detailsPageElements.xpath('//meta[@itemprop="uploadDate"]/@content')[0].split('T')[0] - if date: - date_object = datetime.strptime(date, '%Y-%m-%d') - metadata.originally_available_at = date_object - metadata.year = metadata.originally_available_at.year - elif sceneDate: - date_object = parse(sceneDate) - metadata.originally_available_at = date_object - metadata.year = metadata.originally_available_at.year - - # Genres - movieGenres.clearGenres() - for genreLink in detailsPageElements.xpath('//div[@class="categories"]/p/a'): - genreName = genreLink.text_content().strip() - - movieGenres.addGenre(genreName) - - # Actors - movieActors.clearActors() - for actorLink in detailsPageElements.xpath('//h4[@class="more-scenes"]/a'): - actorName = actorLink.text_content().strip() - actorPhotoURL = '' - - movieActors.addActor(actorName, actorPhotoURL) - - # Posters - xpaths = [ - '//div[@class="icon-container"]//img/@src' - ] - for xpath in xpaths: - for img in detailsPageElements.xpath(xpath): - art.append(img) - - for pageURL in detailsPageElements.xpath('//div[contains(@class, "preview-image-container")]//a/@href'): - req = PAutils.HTTPRequest(PAsearchSites.getSearchBaseURL(siteNum) + pageURL) - posterPage = HTML.ElementFromString(req.text) - - posterUrl = posterPage.xpath('//div[contains(@class, "remove-bs-padding")]/img/@src')[0] - art.append(posterUrl) - - Log('Artwork found: %d' % len(art)) - for idx, posterUrl in enumerate(art, 1): - if not PAsearchSites.posterAlreadyExists(posterUrl, metadata): - # Download image file for analysis - try: - image = PAutils.HTTPRequest(posterUrl) - im = StringIO(image.content) - resized_image = Image.open(im) - width, height = resized_image.size - # Add the image proxy items to the collection - if height > width: - # Item is a poster - metadata.posters[posterUrl] = Proxy.Media(image.content, sort_order=idx) - if width > height and idx > 1: - # Item is an art item - metadata.art[posterUrl] = Proxy.Media(image.content, sort_order=idx) - except: - pass - - return metadata diff --git a/Contents/Code/networkGammaEntOther.py b/Contents/Code/networkGammaEntOther.py index 8d7338982..044a8576e 100644 --- a/Contents/Code/networkGammaEntOther.py +++ b/Contents/Code/networkGammaEntOther.py @@ -109,7 +109,9 @@ def update(metadata, lang, siteNum, movieGenres, movieActors, art): # Title title = None - if sceneType == 'scenes' and len(scenesPagesElements) > 1: + if 'dogfart' in PAsearchSites.getSearchBaseURL(siteNum).lower(): + title = '%s from %s.com' % (PAutils.parseTitle(detailsPageElements['title'], siteNum), detailsPageElements['serie_name']) + elif sceneType == 'scenes' and len(scenesPagesElements) > 1: for idx, scene in scenesPagesElements: if scene['clip_id'] == sceneID: title = '%s, Scene %d' % (detailsPageElements['title'], idx)