Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
# check your cookie
check_cookie()
index = 0
doujinshis = []
doujinshi_ids = []
doujinshi_list = []
if options.favorites:
if not options.is_download:
logger.warning('You do not specify --download option')
doujinshis = favorites_parser(options.page_range)
elif options.tag:
doujinshis = tag_parser(options.tag, sorting=options.sorting, max_page=options.max_page)
elif options.artist:
index = 1
elif options.character:
index = 2
elif options.parody:
index = 3
elif options.group:
index = 4
elif options.language:
index = 5
index = 3
elif options.group:
index = 4
elif options.language:
index = 5
elif options.keyword:
doujinshis = search_parser(options.keyword, sorting=options.sorting, page=options.page)
elif not doujinshi_ids:
doujinshi_ids = options.id
if index:
doujinshis = tag_parser(options.language, max_page=options.max_page, index=index)
print_doujinshi(doujinshis)
if options.is_download and doujinshis:
doujinshi_ids = [i['id'] for i in doujinshis]
if options.is_save_download_history:
with DB() as db:
data = set(db.get_all())
doujinshi_ids = list(set(doujinshi_ids) - data)
if doujinshi_ids:
for i, id_ in enumerate(doujinshi_ids):
if options.delay:
time.sleep(options.delay)