File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ requires-python = ">=3.9"
1515dependencies = [
1616 " aiohttp>=3.8.0" ,
1717 " sqlalchemy>=1.4.0" ,
18- " telegraph>=2.2.0" ,
18+ " telegraph[aio] >=2.2.0" ,
1919]
2020keywords = [
2121 " mangalib" ,
Original file line number Diff line number Diff line change 11aiohttp >= 3.8.0
22sqlalchemy >= 1.4.0
3- telegraph >= 2.2.0
3+ telegraph [ aio ] >= 2.2.0
Original file line number Diff line number Diff line change 1- from mangagraph import Mangagraph , MangagraphError
2- import asyncio
3-
4- # === tests ===
5- # python -m tests.__init__
6- async def test ():
7- try :
8- parser = Mangagraph ()
9- results = await parser .process_chapters (
10- 'https://mangalib.me/ru/manga/7965--chainsaw-man' ,
11- chapter_nums = [90 , 91 , 92 ]
12- )
13-
14- print ("Parsed chapters:\n " )
15- for num , (toc , mirror ) in results .items ():
16- print (f"📖 Chapter { num } " )
17- print (f" TOC: { toc } " )
18- print (f" Mirror: { mirror } \n " )
19-
20- except MangagraphError as e :
21- print (f"Parser error: { e } " )
22-
23- if __name__ == '__main__' :
24- try :
25- asyncio .run (test ())
26- except (KeyboardInterrupt , SystemExit ):
27- print ('Sayonara!' )
You can’t perform that action at this time.
0 commit comments