Closed ordinarygulp closed 5 years ago
The title issue seems to be resolved by by updating line 165 in networkGammaEnt to:
title = detailsPageElements.xpath('//h3[@class="dvdTitle"]')[0].text_content().strip()
This is @PAhelper's code, and multiple sites are covered under the "Gamma Entertainment" umbrella, so I'm not sure if updating this might break another site.
I checked the following:
They all appear to pull title info using line 162 or 168, so changing line 165 doesn't affect them.
In troubleshooting, I noticed that line 156 (which pulls the title of the DVD and then adds it as a collection) also appear to be broken.
I change title section with this:
`
# Title
try:
dvdTitle = detailsPageElements.xpath('//a[contains(@class,"dvdLink")][1]')[0].get('title').strip()
metadata.collections.add(dvdTitle.replace('#0','').replace('#',''))
except:
try:
dvdTitle = detailsPageElements.xpath('//h1[@class="sceneTitle"]')[0].text_content().strip()
metadata.collections.add(dvdTitle.replace('#0','').replace('#',''))
except:
dvdTitle = "This is some damn nonsense that should never match the scene title"
try:
title = detailsPageElements.xpath('//meta[@name="twitter:title"]')[0].get('content').strip()
except:
try:
# Title DVD
title = detailsPageElements.xpath('//h3[@class="dvdTitle"]')[0].text_content().strip()
except:
try:
# Title Scene
title = detailsPageElements.xpath('//h1[@class="sceneTitle"]')[0].text_content().strip()
except:
try:
title = detailsPageElements.xpath('//h1')[0].text_content().strip()
except:
title = "I couldn't find the title, please report this on github: https://github.com/PAhelper/PhoenixAdult.bundle/issues"
if "Scene #" in detailsPageElements.xpath('//title')[0].text_content().strip() and "Scene #" not in title:
pageTitle = detailsPageElements.xpath('//title')[0].text_content().strip()
alpha = pageTitle.find('Scene')+6
omega = pageTitle.find(' ',alpha)
title = (title + " - Scene " + pageTitle[alpha:omega].strip()).replace('#0','').replace('#','')
metadata.title = title
`
PR #194
Closing because of #194 being merged
Devilsfilm 'full films' are being filled as 'Dvd Info' for the title, and empty descriptions/no images.