@@ -198,9 +198,9 @@ def is_single_album(self) -> bool:
198198 return self ._series_id == 0
199199
200200 @property
201- def keywords (self ) -> List [str ]:
201+ def tags (self ) -> List [str ]:
202202 if self .from_album is not None :
203- return self .from_album .keywords
203+ return self .from_album .tag_list
204204
205205 return self ._keywords .split (',' )
206206
@@ -303,19 +303,30 @@ def __init__(self,
303303 episode_list ,
304304 page_count ,
305305 author_list ,
306- keywords_list ,
306+ tag_list ,
307307 pub_date ,
308308 update_date ,
309+ likes ,
310+ views ,
311+ comment_count ,
312+ work_list ,
313+ actor_list ,
309314 ):
310315 self .album_id : str = album_id
311316 self .scramble_id : str = scramble_id
312317 self .title : str = title
313- self .page_count = int (page_count )
314- self ._author_list : List [str ] = author_list
315- self ._keywords_list : List [str ] = keywords_list
318+ self .page_count = int (page_count ) # 总页数
316319 self .pub_date : str = pub_date # 发布日期
317320 self .update_date : str = update_date # 更新日期
318321
322+ self .likes : str = likes # [1K] 點擊喜歡
323+ self .views : str = views # [40K] 次觀看
324+ self .comment_count = int (comment_count )
325+ self .work_list : List [str ] = work_list # 作品
326+ self .actor_list : List [str ] = actor_list # 登場人物
327+ self .tag_list : List [str ] = tag_list # 標籤
328+ self .author_list : List [str ] = author_list # 作者
329+
319330 # 有的 album 没有章节,则自成一章。
320331 if len (episode_list ) == 0 :
321332 # photo_id, photo_index, photo_title, photo_pub_date
@@ -325,6 +336,38 @@ def __init__(self,
325336
326337 self .episode_list : List [Tuple ] = episode_list
327338
339+ @property
340+ def author (self ):
341+ """
342+ 作者
343+ 禁漫本子的作者标签可能有多个,全部作者请使用字段 self.author_list
344+ """
345+ if len (self .author_list ) >= 1 :
346+ return self .author_list [0 ]
347+
348+ return JmModuleConfig .default_author
349+
350+ @property
351+ def id (self ):
352+ return self .album_id
353+
354+ @staticmethod
355+ def distinct_episode (episode_list ):
356+ ret = []
357+
358+ def not_exist (episode ):
359+ photo_id = episode [0 ]
360+ for each in ret :
361+ if each [0 ] == photo_id :
362+ return False
363+ return True
364+
365+ for episode in episode_list :
366+ if not_exist (episode ):
367+ ret .append (episode )
368+
369+ return ret
370+
328371 def create_photo_detail (self , index ) -> Tuple [JmPhotoDetail , Tuple ]:
329372 # 校验参数
330373 length = len (self .episode_list )
@@ -351,37 +394,6 @@ def create_photo_detail(self, index) -> Tuple[JmPhotoDetail, Tuple]:
351394
352395 return photo , episode_info
353396
354- @property
355- def author (self ):
356- if len (self ._author_list ) >= 1 :
357- return self ._author_list [0 ]
358- return JmModuleConfig .default_author
359-
360- @property
361- def keywords (self ) -> List [str ]:
362- return self ._keywords_list
363-
364- @property
365- def id (self ):
366- return self .album_id
367-
368- @staticmethod
369- def distinct_episode (episode_list ):
370- ret = []
371-
372- def not_exist (episode ):
373- photo_id = episode [0 ]
374- for each in ret :
375- if each [0 ] == photo_id :
376- return False
377- return True
378-
379- for episode in episode_list :
380- if not_exist (episode ):
381- ret .append (episode )
382-
383- return ret
384-
385397 def getindex (self , item ) -> JmPhotoDetail :
386398 return self .create_photo_detail (item )[0 ]
387399
@@ -421,7 +433,7 @@ def wrap_single_album(cls, album: JmAlbumDetail) -> 'JmSearchPage':
421433 album .title ,
422434 None ,
423435 None ,
424- album .keywords ,
436+ album .tag_list ,
425437 )
426438 obj = JmSearchPage ([album_info ])
427439
0 commit comments