Skip to content

Commit

Permalink
Arabic source fix (#2309)
Browse files Browse the repository at this point in the history
* Update 69shuba.py

* Update daotranslate.py

* Update daotranslate.py

* Update aquamanga.py

* Add source webtoons

* fix source webtoons

* revert changes and create new PR for new source

* Revert "Update 69shuba.py"

This reverts commit d794048.

* revert changes

* Update scraper.py
  • Loading branch information
zGadli authored Mar 29, 2024
1 parent 087771f commit d77710f
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 8 deletions.
2 changes: 1 addition & 1 deletion lncrawl/core/scraper.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ def __process_request(self, method: str, url, **kwargs):
headers.setdefault("Referer", self.last_soup_url or self.home_url)
headers.setdefault("User-Agent", self.user_agent)
kwargs["headers"] = {
str(k).encode("ascii"): str(v).encode("ascii")
str(k).encode("utf-8"): str(v).encode("utf-8")
for k, v in headers.items()
if v
}
Expand Down
2 changes: 1 addition & 1 deletion sources/en/a/aquamanga.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

class AquaMangaCrawler(Crawler):
has_manga = True
base_url = ["https://aquamanga.com/", "https://aquamanga.org/"]
base_url = ["https://aquamanga.com/"]

search_url = "%s?s=%s&post_type=wp-manga&author=&artist=&release="

Expand Down
4 changes: 2 additions & 2 deletions sources/en/d/daotranslate.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@
from lncrawl.core.crawler import Crawler

logger = logging.getLogger(__name__)
search_url = "https://daotranslate.us/?s=%s"
search_url = "https://daotranslate.com/?s=%s"


class DaoTranslateCrawler(Crawler):
base_url = ["https://daotranslate.com/", "https://daotranslate.us/"]
base_url = "https://daotranslate.com/"
has_mtl = True

def initialize(self):
Expand Down
7 changes: 3 additions & 4 deletions sources/zh/69shuba.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
"Accept-Language": "en-US,en;q=0.9,de-CH;q=0.8,de;q=0.7",
"Cache-Control": "no-cache",
"Content-Type": "application/x-www-form-urlencoded",
"Origin": "https://www.69shu.pro",
"Origin": "https://www.69xinshu.com",
"DNT": "1",
"Referer": "https://www.69shu.pro/modules/article/search.php",
"Referer": "https://www.69xinshu.com/modules/article/search.php",
"Connection": "keep-alive",
"Upgrade-Insecure-Requests": "1",
"Sec-Ch-Ua": '"Not_A Brand";v="8", "Chromium";v="120", "Opera GX";v="106"',
Expand All @@ -28,15 +28,14 @@
}

logger = logging.getLogger(__name__)
search_url = "https://www.69shu.pro/modules/article/search.php" # Updated to the new domain
search_url = "https://www.69xinshu.com/modules/article/search.php" # Updated to the new domain


class sixnineshu(Crawler):
base_url = [
"https://www.69shuba.com/",
"https://www.69shu.com/",
"https://www.69xinshu.com/",
"https://www.69shu.pro/"
]

def initialize(self):
Expand Down

0 comments on commit d77710f

Please sign in to comment.