dipu-bd / lightnovel-crawler

Generate and download e-books from online sources.
https://pypi.org/project/lightnovel-crawler/
GNU General Public License v3.0
1.42k stars 279 forks source link

Fix this source : Mtlnation #1453

Closed Flwk closed 2 years ago

Flwk commented 2 years ago

Hello,

I have this error when i try to get a novel on MTLNATION

The novel : https://mtlnation.com/novel/villain-seized-the-assassin-heroine-at-the-start/

================================================================================
                          [#] Lightnovel Crawler v2.31.0
                  https://github.com/dipu-bd/lightnovel-crawler
--------------------------------------------------------------------------------

-> Press  Ctrl + C  to exit

? Enter novel page url or query novel: https://mtlnation.com/novel/villain-seized-the-assassin-heroine-at-the-start/
? Do you want to log in? Yes
? User/Email: *************
? Password: ***************
Retrieving novel info...
https://mtlnation.com/novel/villain-seized-the-assassin-heroine-at-the-start/

 ! Error: list indices must be integers or slices, not str
 <class 'TypeError'>
 File "lncrawl\bots\console\integration.py", line 89, in start
    _download_novel()
  File "lncrawl\bots\console\integration.py", line 78, in _download_novel
    self.app.get_novel_info()
  File "lncrawl\core\app.py", line 140, in get_novel_info
    self.crawler.read_novel_info()
  File "C:\Users\Bilal\.lncrawl\sources\en\m\mtlnation.py", line 55, in read_novel_info
    self.novel_title = data['data']['title']

--------------------------------------------------------------------------------
 -  https://github.com/dipu-bd/lightnovel-crawler/issues
================================================================================
Press ENTER to exit...

Thanks a lot !

Flwk commented 2 years ago

@dipu-bd Hello,

I tried again,but it doesn't work :

With login :

`================================================================================ [#] Lightnovel Crawler v2.32.0 https://github.com/dipu-bd/lightnovel-crawler

-> Press Ctrl + C to exit

? Enter novel page url or query novel: https://mtlnation.com/novel/is-the-big-villain-crazy-really-made-the-empress-int o-a-puppet ? Do you want to log in? Yes ? User/Email: ** ? Password:

! Error: 503 Server Error: Service Temporarily Unavailable for url: https://api.mtlnation.com/api/v2/accounts/login <class 'requests.exceptions.HTTPError'> File "lncrawl\core\crawler.py", line 322, in post_json response = self.post_response(url, data, headers) File "lncrawl\core\crawler.py", line 262, in post_response return self.__process_response(response) File "lncrawl\core\crawler.py", line 207, in __process_response response.raise_for_status() File "requests\models.py", line 1021, in raise_for_status


Without login : `================================================================================ [#] Lightnovel Crawler v2.32.0 https://github.com/dipu-bd/lightnovel-crawler

-> Press Ctrl + C to exit

? Enter novel page url or query novel: https://mtlnation.com/novel/is-the-big-villain-crazy-really-made-the-empress-int o-a-puppet ? Do you want to log in? No Retrieving novel info... https://mtlnation.com/novel/is-the-big-villain-crazy-really-made-the-empress-into-a-puppet NOVEL: Is The Big Villain Crazy, Really Made The Empress Into A Puppet? 6 volumes and 524 chapters found ? Enter output directory: C:\Users\Bilal\Downloads ? What to do with existing folder? Remove old folder and start fresh ? Which chapters to download? Everything! (524 chapters) ? 524 chapters selected Continue ? Which output formats to create? [epub] ? How many files to generate? Pack everything into a single file Chapters: 19%|█████████████ | 101/524 [00:06<00:26, 15.70item/s]


Thank you very much for all your works !

idMysteries commented 2 years ago

@dipu-bd the problem is not in the source, but in the downloader.

изображение

dipu-bd commented 2 years ago

Downloader has some issues. I already fixed it in a commit. It is pending to be merged with the master.

The reported issue is different: Error: 503 Server Error: Service Temporarily Unavailable for url: https://api.mtlnation.com/api/v2/accounts/login We need to check if the link is not working anymore

idMysteries commented 2 years ago

изображение изображение

dipu-bd commented 2 years ago

I checked that the login is okay. The 503 error is caused by cloudflare security. There is no easy way to solve it for now.