코드 리뷰, .lownload 파일 작성 함수 추가

This commit is contained in:
2026-08-29 02:47:37 +09:00
parent 321b1c03a0
commit a56d443e80
3 changed files with 53 additions and 17 deletions
+17 -15
View File
@@ -80,18 +80,19 @@ class GetArc_Hitomi:
strContent = driver.page_source
listRet = self.parseMangaInfos(strContent)
#for Idx in range(len(listRet)):
# print(f"{Idx} : {listRet[Idx]}")
try:
for Idx in range(len(listRet)):
print(f"{Idx} : {listRet[Idx]}")
with open( f"{id}.txt", 'w') as file:
for item in listRet[Idx]:
file.write( + "\n")
except IOError:
util.DbgOut(f"Error: Could not write to the file at {id}.txt.", True)
for Idx in range(len(listRet)):
util.DbgOut(f"{Idx} : {listRet[Idx]}", True)
if True == bSave and 0 < len(listRet):
strFileName = f"{nID}.txt"
try:
with open(strFileName, 'w', encoding="utf-8") as file:
for item in listRet:
file.write(f"{item}\n")
util.DbgOut(f"Saved to {strFileName}", True)
except IOError:
util.DbgOut(f"Error: Could not write to the file at {strFileName}.", True)
except Exception as e:
util.DbgOut(f"Hitomi Loading Error : {e}", True)
@@ -182,11 +183,12 @@ class GetArc_Hitomi:
#util.DbgOut(outMsg)
#
if "Series" == tds[0]:
retPtr.serires = listTags[-1].name
elif "Type" == tds[0]:
strLabel = tds[0].text.strip()
if "Series" == strLabel:
retPtr.series = listTags[-1].name
elif "Type" == strLabel:
retPtr.type = listTags[-1].name
elif "Language" == tds[0]:
elif "Language" == strLabel:
retPtr.language = listTags[-1].name
else:
pass