Example #1
0
	def run (self):
		success = False
		if (self.uptodate_FLAG):
			return		
			
		try:
			for current_chapter in self.siteParser.chapters:
				#print "Current Chapter =" + str(current_chapter[0])
				iLastChap = current_chapter[1]
		
			success = self.siteParser.download()
			
		except SiteParserBase.MangaNotFound as Instance:
			print("Error: Manga ("+self.manga+")")
			print(Instance)
			print("\n")
			return 
		
		# Update the XML File only when all the chapters successfully download. If 1 of n chapters failed 
		# to download, the next time the script is run the script will try to download all n chapters. However,
		# autoskipping (unless the user specifies the --overwrite Flag) should skip the chapters that were already
		# downloaded so little additional time should be added.
			
		if self.xmlfile_path != None and success:
			updateNode(self.dom, self.node, 'LastChapterDownloaded', str(iLastChap))
			self.updateTimestamp()	
Example #2
0
    def run(self):
        success = False
        if (self.uptodate_FLAG):
            return

        try:
            for current_chapter in self.siteParser.chapters:
                #print "Current Chapter =" + str(current_chapter[0])
                iLastChap = current_chapter[1]

            success = self.siteParser.download()

        except SiteParserBase.MangaNotFound as Instance:
            print("Error: Manga (" + self.manga + ")")
            print(Instance)
            print("\n")
            return

        # Update the XML File only when all the chapters successfully download. If 1 of n chapters failed
        # to download, the next time the script is run the script will try to download all n chapters. However,
        # autoskipping (unless the user specifies the --overwrite Flag) should skip the chapters that were already
        # downloaded so little additional time should be added.

        if self.xmlfile_path != None and success:
            updateNode(self.dom, self.node, 'LastChapterDownloaded',
                       str(iLastChap))
            self.updateTimestamp()
Example #3
0
	def updateTimestamp(self):
		t = datetime.datetime.today()
		timeStamp = "%d-%02d-%02d %02d:%02d:%02d" % (t.year, t.month, t.day, t.hour, t.minute, t.second)
		
		updateNode(self.dom, self.node, 'timeStamp', timeStamp)
Example #4
0
    def updateTimestamp(self):
        t = datetime.datetime.today()
        timeStamp = "%d-%02d-%02d %02d:%02d:%02d" % (
            t.year, t.month, t.day, t.hour, t.minute, t.second)

        updateNode(self.dom, self.node, 'timeStamp', timeStamp)