View Single Post
Old 05-29-2021, 05:19 PM   #5947
HowWouldIKnow
Enthusiast
HowWouldIKnow began at the beginning.
 
Posts: 31
Karma: 10
Join Date: Dec 2020
Device: Kobo Glo
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?
HowWouldIKnow is offline   Reply With Quote