How to use the comiccrawler.error.PauseDownloadError function in comiccrawler

To help you get started, we’ve selected a few comiccrawler examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github eight04 / ComicCrawler / comiccrawler / mods / sankaku.py View on Github external
def login_check(html):
	if '<a href="/user/login">' in html:
		raise PauseDownloadError("You didn't login")
</a>
github eight04 / ComicCrawler / comiccrawler / mods / deviantart.py View on Github external
def check_login(html, url):
	if not re.search('"loggedin":true', html, re.I):
		raise PauseDownloadError("you didn't log in!")
github eight04 / ComicCrawler / comiccrawler / core / __init__.py View on Github external
path_each(
					self.savepath.parent(),
					lambda file: self.checksums.add(get_file_checksum(file))
				)

			checksum = get_checksum(self.image_bin)
			if checksum in self.checksums:
				raise LastPageError
			else:
				self.checksums.add(checksum)
				
		try:
			content_write(self.savepath.full_fn(self.get_filename(), self.image_ext), self.image_bin)
		except OSError:
			traceback.print_exc()
			raise PauseDownloadError("Failed to write file!")
github eight04 / ComicCrawler / comiccrawler / core / __init__.py View on Github external
print("Start downloading " + mission.title)
	mission.state = "DOWNLOADING"
	try:
		crawl(mission, savepath)

		# Check if mission is complete
		for ep in mission.episodes:
			if not ep.complete and not ep.skip:
				raise Exception("Mission is not completed")

	except WorkerExit:
		mission.state = "PAUSE"
		download_ch.pub('DOWNLOAD_PAUSE', mission)
		raise

	except PauseDownloadError as err:
		mission.state = "ERROR"
		download_ch.pub('DOWNLOAD_INVALID', (err, mission))

	except Exception as err:
		mission.state = "ERROR"
		download_ch.pub('DOWNLOAD_ERROR', (err, mission))
		raise

	else:
		mission.state = "FINISHED"
		download_ch.pub("DOWNLOAD_FINISHED", mission)
github eight04 / ComicCrawler / comiccrawler / mods / exh.py View on Github external
def check_login(html):
	if html[6:10] == "JFIF":
		raise PauseDownloadError("You didn't login!")
github eight04 / ComicCrawler / comiccrawler / mods / pixiv.py View on Github external
def check_login_html(html):
	if "pixiv.user.loggedIn = true" not in html and "login: 'yes'" not in html:
		raise PauseDownloadError("you didn't login!")
github eight04 / ComicCrawler / comiccrawler / mods / pixiv.py View on Github external
def check_login(data):
	if not data.get("userData"):
		raise PauseDownloadError("you didn't login!")