Exemple #1
0
def downloadH(code):
  try:
    doujin = Hentai(code)
    if os.path.isdir('H7u7H\{}'.format(code)) == False:
      doujin.download(progressbar=True )
      shutil.move('{}'.format(code), 'H7u7H')
    else:
      windowns.value = 0
  except requests.HTTPError:
    windowns.value = 1
    print('da error')
Exemple #2
0
def getby_id(cmd):
	id = int(cmd.replace('nh', '').replace('get', '').strip())
	if len(str(id)) > 6:
		print(f'{id} is not a manga id! So... Zero Two.')
		id = 281415
	manga = Hentai(id)
	Hentai.exists(manga.id)
	print(f'#{manga.id} :: {manga.title(Format.Pretty)}')
	
	if id != 281415:
		if confirm('proceed download'):
			print('Starting download...\n')
			manga.download(progressbar=True)
			print(f'Downloading {manga.title(Format.Pretty)} Success!\n')
		else:
			print(f'Downloading {manga.title(Format.Pretty)} aborted.\n')
	else:
		manga.download(progressbar=True)
		print('Enjoy.')
def checkHentaiLangOnly(hentaiID, language):
    print(f'Checking Post ID: {hentaiID}')

    try:
        doujin = Hentai(hentaiID)
    except:
        print(' > Invalid post code.')

        return False

    if language in str(doujin.language):
        print(' > Valid Doujin! Language is', language, ".")
        print('downloading!')
        doujin.download()

        return True
    else:
        print('> Valid Post but language is not', language, '.')

        return False
def checkHentaiExclude(hentaiID, language, tagexcluded):
    print(f'Checking Post ID: {hentaiID}')

    try:
        doujin = Hentai(hentaiID)
    except:
        print(' > Invalid post code.')

        return False

    if language in str(doujin.language) and tagexcluded not in str(doujin.tag):
        print(' > Valid Doujin! Language is', language, ".")
        print(' > Doujin does not contain tag: ', tagexcluded)
        print('downloading!')
        doujin.download()

        return True
    else:
        print('> Valid Post but language is not', language, '.')

        return False