def esjzoneChecker(esjzoneHelper, show_no_update_msg=False): novel_name = esjzoneHelper.name if esjzoneHelper.checkUpdate(): printT( f"Update found for {esjzoneHelper.name}: {esjzoneHelper.latest_chapter_title} ({esjzoneHelper.latest_chapter_url})" ) tgHelper = TgHelper(token, chat_id) content = f"novel <<{novel_name}>> updated!" url_text = f"<<{novel_name}>> {esjzoneHelper.latest_chapter_title}" tgHelper.send_channel( content=content, url_text=url_text, url=esjzoneHelper.latest_chapter_url, ) else: if show_no_update_msg: printT(f"No update found for {novel_name}")
def wutuxsChecker(wutuxsHelper, show_no_update_msg=False): novel_name = wutuxsHelper.name if wutuxsHelper.checkUpdate(): printT( f"Update found for {wutuxsHelper.name}: {wutuxsHelper.latest_chapter_title} ({wutuxsHelper.latest_chapter_url})" ) tgHelper = TgHelper(token, chat_id) content = f"comic <<{novel_name}>> updated!" url_text = f"<<{novel_name}>> {wutuxsHelper.latest_chapter_title}" tgHelper.send_channel( content=content, url_text=url_text, url=wutuxsHelper.latest_chapter_url, ) else: if show_no_update_msg: printT(f"No update found for {novel_name}")
def manhuaguiChecker(manhuaguiHelper, show_no_update_msg=False): comic_name = manhuaguiHelper.name if manhuaguiHelper.checkUpdate(): printT( f"Update found for {manhuaguiHelper.name}: {manhuaguiHelper.latest_chapter_title} ({manhuaguiHelper.latest_chapter_url})" ) tgHelper = TgHelper(token, chat_id) content = f"comic <<{comic_name}>> updated!" url_text = f"<<{comic_name}>> {manhuaguiHelper.latest_chapter_title}" tgHelper.send_channel( content=content, url_text=url_text, url=manhuaguiHelper.latest_chapter_url, ) else: if show_no_update_msg: printT(f"No update found for {comic_name}")
tgHelper = TgHelper(token, chat_id) content = f"novel <<{novel_name}>> updated!" url_text = f"<<{novel_name}>> {esjzoneHelper.latest_chapter_title}" tgHelper.send_channel( content=content, url_text=url_text, url=esjzoneHelper.latest_chapter_url, ) else: if show_no_update_msg: printT(f"No update found for {novel_name}") if __name__ == "__main__": printT("Program Start!") # printT("Check hour range: {}:00:00 - {}:00:00".format(start_hour, end_hour)) with open("list.yaml") as f: data = yaml.load(f, Loader=yaml.FullLoader) cocomanhuaHelperList = [] wutuxsHelperList = [] manhuaguiHelperList = [] esjzoneHelperList = [] for item in data: if CocomanhuaHelper.match(item["url"]): cocomanhuaHelperList.append( CocomanhuaHelper(name=item["name"], url=item["url"]) )