Skip to content

Commit

Permalink
Merge pull request #1359 from dipu-bd/dev
Browse files Browse the repository at this point in the history
Version 2.31.0
  • Loading branch information
dipu-bd authored May 14, 2022
2 parents 6721ffe + 1f9368f commit 4c614cb
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 9 deletions.
6 changes: 4 additions & 2 deletions .github/contribs.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,7 @@
"dshortk@gmail.com": null,
"Bausson \u00c9tienne": null,
"etienne@bausson.fr": null,
"David Pineau": "Joacchim"
}
"David Pineau": "Joacchim",
"zerty": null,
"zerty@users.noreply.github.com": null
}
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ $ lncrawl -h
┃┃╱╭╋┫╭╮┃╭╮┃┃┃╭╮┫╭╮┃╰╯┃┃━┫┃╱┃┃╱╭┫╭┫╭╮┃╰╯╰╯┃┃┃┃━┫╭╯
┃╰━╯┃┃╰╯┃┃┃┃╰┫┃┃┃╰╯┣╮╭┫┃━┫╰╮┃╰━╯┃┃┃╭╮┣╮╭╮╭┫╰┫┃━┫┃
╰━━━┻┻━╮┣╯╰┻━┻╯╰┻━━╯╰╯╰━━┻━╯╰━━━┻╯╰╯╰╯╰╯╰╯╰━┻━━┻╯
╱╱╱╱╱╭━╯┃ v2.30.0
╱╱╱╱╱╭━╯┃ v2.31.0
╱╱╱╱╱╰━━╯ 🔗 https://github.com/dipu-bd/lightnovel-crawler
--------------------------------------------------------------------------------
usage: lncrawl [options...]
Expand Down Expand Up @@ -1174,9 +1174,9 @@ We are supporting 204 sources and 233 crawlers.
<td><a href="https://github.com/dipu-bd/lightnovel-crawler/blob/master/sources/en/w/wuxialeague.py" title="22 March 2022 02:50:32 PM">5</a></td>
<td><a href="https://github.com/dipu-bd"><img src="https://avatars.githubusercontent.com/u/5158124?v=4&s=24" alt="dipu-bd" height="24"/></a></td>
</tr>
<tr><td><span title="Contains machine translations"></span><span title="Supports searching"></span><span title="Supports login"></span><span title="Contains manga/manhua/manhwa"></span></td>
<tr><td><span title="Contains machine translations"></span><span title="Supports searching"></span><span title="Supports login">🔑</span><span title="Contains manga/manhua/manhwa"></span></td>
<td><a href="https://www.wuxiaworld.com/" target="_blank">https://www.wuxiaworld.com/</a></td>
<td><a href="https://github.com/dipu-bd/lightnovel-crawler/blob/master/sources/en/w/wuxiacom.py" title="04 February 2022 12:38:52 AM">65</a></td>
<td><a href="https://github.com/dipu-bd/lightnovel-crawler/blob/master/sources/en/w/wuxiacom.py" title="14 May 2022 09:42:09 PM">66</a></td>
<td><a href="https://github.com/dipu-bd"><img src="https://avatars.githubusercontent.com/u/5158124?v=4&s=24" alt="dipu-bd" height="24"/></a> <a href="https://github.com/yudilee"><img src="https://avatars.githubusercontent.com/u/7065691?v=4&s=24" alt="yudilee" height="24"/></a> <a href="https://github.com/kuwoyuki"><img src="https://avatars.githubusercontent.com/u/51709703?v=4&s=24" alt="kuwoyuki" height="24"/></a></td>
</tr>
<tr><td><span title="Contains machine translations"></span><span title="Supports searching"></span><span title="Supports login"></span><span title="Contains manga/manhua/manhwa"></span></td>
Expand Down
2 changes: 1 addition & 1 deletion lncrawl/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.30.0
2.31.0
2 changes: 1 addition & 1 deletion requirements-app.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
ascii
regex
packaging
pyease-grpc>=1.2.0
pyease-grpc>=1.3.0
python-dotenv>=0.15.0,<1.0.0
beautifulsoup4>=4.8.0,<5.0.0
requests>=2.20.0,<3.0.0
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ autopep8
ascii
regex
packaging
pyease-grpc>=1.2.0
pyease-grpc>=1.3.0
python-dotenv>=0.15.0,<1.0.0
beautifulsoup4>=4.8.0,<5.0.0
requests>=2.20.0,<3.0.0
Expand Down
2 changes: 1 addition & 1 deletion sources/_index.json

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions sources/en/w/wuxiacom.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,17 @@ def initialize(self):
self.grpc = RpcSession.from_descriptor(WUXIWORLD_PROTO)
# end def

def login(self, email: str, password: str) -> None:
self.bearer_token = email + ' ' + password

def read_novel_info(self):
slug = re.findall(r'/novel/([^/]+)', self.novel_url)[0]
logger.debug('Novel slug: %s', slug)

response = self.grpc.request(
'https://api.wuxiaworld.com/wuxiaworld.api.v2.Novels/GetNovel',
{'slug': slug},
headers={ 'authorization': self.bearer_token, }
)
response.raise_for_status()
assert response.single
Expand All @@ -42,6 +46,7 @@ def read_novel_info(self):
response = self.grpc.request(
'https://api.wuxiaworld.com/wuxiaworld.api.v2.Chapters/GetChapterList',
{'novelId': novel['id']},
headers={ 'authorization': self.bearer_token, }
)
response.raise_for_status()
assert response.single
Expand Down Expand Up @@ -70,6 +75,7 @@ def download_chapter_body(self, chapter):
response = self.grpc.request(
'https://api.wuxiaworld.com/wuxiaworld.api.v2.Chapters/GetChapter',
{'chapterProperty': {'chapterId': chapter['entityId']}},
headers={ 'authorization': self.bearer_token, }
)
response.raise_for_status()
assert response.single
Expand Down

0 comments on commit 4c614cb

Please sign in to comment.