View Single Post
Old 10-30-2021, 06:52 PM   #6618
JimmXinu
Plugin Developer
JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.
 
JimmXinu's Avatar
 
Posts: 6,984
Karma: 4604635
Join Date: Dec 2011
Location: Midwest USA
Device: Kobo Clara Colour running KOReader
Quote:
Originally Posted by junni View Post
Hi JimmXinu, with further testing i noticed that there was a bug in this code, because the website changes the HREF tag based on completed or ongoing novel . so i made a slight change which made it work. I should have tested further , but i was just too excited to post my accomplishment. .

Code:
try:
            status = soup.find("a", href=re.compile("/completed-novel"), class_="text-primary").text
        except:
            status = soup.find("a", href=re.compile("/ongoing-novel"), class_="text-primary").text		
		
        if status == "Completed":
            self.story.setMetadata("status", "Completed")
        else:
            self.story.setMetadata("status", "In-Progress")
Isn't that the same issue I identified and fixed? Effectively, the results are the same, but my version is a bit short and faster, I think.
JimmXinu is offline   Reply With Quote