mirror of
https://codeberg.org/Cyberpro123/AO3-DL.git
synced 2026-08-06 23:43:19 +00:00
autoformatter >:(
This commit is contained in:
parent
e74fe9508f
commit
172b42e24e
3 changed files with 12 additions and 7 deletions
|
|
@ -202,7 +202,7 @@ def processSingle(
|
|||
paraCloseLoc = tag.string.rfind(")")
|
||||
if paraOpenLoc < paraCloseLoc and paraOpenLoc != -1 and paraCloseLoc != -1:
|
||||
# pseud detected
|
||||
sqlInfo["authors"].append(tag.string[paraOpenLoc + 1:paraCloseLoc])
|
||||
sqlInfo["authors"].append(tag.string[paraOpenLoc + 1 : paraCloseLoc])
|
||||
else:
|
||||
# not a pseud
|
||||
sqlInfo["authors"].append(tag.string)
|
||||
|
|
@ -258,8 +258,13 @@ def processSingle(
|
|||
tag=allPrefaces[chaptNum - 1].h2.string,
|
||||
).strip()
|
||||
chaptTitleNoPrefix = f"Chapter {chaptNum}: "
|
||||
if (sqlInfo["text"][chaptNum]["title"][:len(chaptTitleNoPrefix)] == chaptTitleNoPrefix):
|
||||
sqlInfo["text"][chaptNum]["title"] = sqlInfo["text"][chaptNum]["title"][len(chaptTitleNoPrefix):]
|
||||
if (
|
||||
sqlInfo["text"][chaptNum]["title"][: len(chaptTitleNoPrefix)]
|
||||
== chaptTitleNoPrefix
|
||||
):
|
||||
sqlInfo["text"][chaptNum]["title"] = sqlInfo["text"][chaptNum]["title"][
|
||||
len(chaptTitleNoPrefix) :
|
||||
]
|
||||
preBQs = allPrefaces[chaptNum - 1].find_all("blockquote")
|
||||
if len(preBQs) == 2:
|
||||
sqlInfo["text"][chaptNum]["summary"] = makeStr(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue