From 352e5e5aada9a48b4942facdea0d861c0d0252de Mon Sep 17 00:00:00 2001 From: CryZFix Date: Thu, 19 Oct 2023 16:47:40 +0400 Subject: [PATCH] Fix source The site refuses to accept the Referer header, which is a slice of the current url, so we use the main url of the site without language prefixes. --- sources/multi/mtlnovel.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sources/multi/mtlnovel.py b/sources/multi/mtlnovel.py index ac9f62f69..e2333b387 100644 --- a/sources/multi/mtlnovel.py +++ b/sources/multi/mtlnovel.py @@ -21,6 +21,9 @@ class MtlnovelCrawler(Crawler): "http://es.mtlnovel.com/", ] + def initialize(self): + self.home_url = "https://mtlnovel.com/" + def search_novel(self, query): query = query.lower().replace(" ", "%20") # soup = self.get_soup(search_url % query)