Again about Literotica.
When I see it correctly then you are already parsing if it is a series or not.
Quote:
* If it's in a tr.sl => Chapter in series
* Search up from there until we find a tr.ser-ttl (this is the
story)
else:
seriesTr = urlTr.previousSibling
while 'ser-ttl' not in seriesTr['class']:
seriesTr = seriesTr.previousSibling
m = re.match(r"^(?P<title>.*?):\s(?P<numChapters>\d+)\ sPart\sSeries$", seriesTr.find("strong").text)
self.story.setMetadata('title', m.group('title'))
seriesTitle = m.group('title')
|
You are just not exposing it to the outside.
Or do I see that wrong?