Giter Site home page Giter Site logo

calibrelibgenstore's People

Contributors

fallaciousreasoning avatar gstcyr avatar harmtemolder avatar phuhl avatar safurrier avatar sinerak avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

calibrelibgenstore's Issues

CalibreLibgenStore-0.3.zip is invalid. It does not contain a top-level __init__.py file

Hello,

Don't know if I'm the only one to have this error when loading the plugin but I keep getting this error.
I've also tried to unistall and reinstall it and to package it myself but it doesn't work.

Any idea?

`calibre, version 4.23.0
ERROR: Unhandled exception: InvalidPlugin:The plugin in u'/Users/johndoe/Downloads/CalibreLibgenStore-0.3.zip' is invalid. It does not contain a top-level init.py file

calibre 4.23 embedded-python: True is64bit: True
Darwin-18.7.0-x86_64-i386-64bit Darwin ('64bit', '')
('Darwin', '18.7.0', 'Darwin Kernel Version 18.7.0: Thu Jun 18 20:50:10 PDT 2020; root:xnu-4903.278.43~1/RELEASE_X86_64')
Python 2.7.16
OSX: ('10.14.6', ('', '', ''), 'x86_64')
Interface language: None
Successfully initialized third party plugins: Libgen Fiction (0, 1, 0) && The Eye (0, 1, 0)
Traceback (most recent call last):
File "site-packages/calibre/gui2/preferences/plugins.py", line 317, in add_plugin
File "site-packages/calibre/customize/ui.py", line 472, in add_plugin
File "site-packages/calibre/customize/ui.py", line 61, in load_plugin
File "site-packages/calibre/customize/zipplugin.py", line 194, in load
File "site-packages/calibre/customize/zipplugin.py", line 292, in _locate_code
InvalidPlugin: The plugin in u'/Users/johndoe/Downloads/CalibreLibgenStore-0.3.zip' is invalid. It does not contain a top-level init.py file
`

Thanks

Libgen not initializing when opening store - LibgenStore object has no attribute 'libgen'

With CalibreLibgenStore 0.4 and Using Calibre 5 running on Docker linux container and also on OSX I get this error when trying to search Libgen.

I get this when navigating Get Books -> Stores -> Libgen Fiction
Previously this has worked by opening up Libgen in an external browser window but now this error results:

Linux:

calibre, version 5.3.0
ERROR: Unhandled exception: <b>AttributeError</b>:'LibgenStore' object has no attribute 'libgen'

calibre 5.3  embedded-python: True is64bit: True
Linux-4.4.59+-x86_64-with-glibc2.2.5 Linux ('64bit', '')
('Linux', '4.4.59+', '#25426 SMP PREEMPT Wed Jul 8 03:21:27 CST 2020')
Python 3.8.5
Interface language: None
Successfully initialized third party plugins: Libgen Fiction (0, 4, 0)
Traceback (most recent call last):
  File "calibre/gui2/actions/store.py", line 131, in open_store
  File "calibre_plugins.libgen_fiction.__init__", line 80, in open
    else self.libgen.base_url
AttributeError: 'LibgenStore' object has no attribute 'libgen'

OSX:

calibre, version 5.7.2
ERROR: Unhandled exception: <b>AttributeError</b>:'LibgenStore' object has no attribute 'libgen'

calibre 5.7.2  embedded-python: True is64bit: True
macOS-10.15.6-x86_64-i386-64bit Darwin ('64bit', '')
('Darwin', '19.6.0', 'Darwin Kernel Version 19.6.0: Thu Jun 18 20:49:00 PDT 2020; root:xnu-6153.141.1~1/RELEASE_X86_64')
Python 3.8.5
OSX: ('10.15.6', ('', '', ''), 'x86_64')
Interface language: None
Successfully initialized third party plugins: Libgen Fiction (0, 4, 0)
Traceback (most recent call last):
  File "calibre/gui2/actions/store.py", line 131, in open_store
  File "calibre_plugins.libgen_fiction.__init__", line 80, in open
    else self.libgen.base_url
AttributeError: 'LibgenStore' object has no attribute 'libgen'

It looks like it's trying to open the browser before initializing the LibgenFiction object attached by calling the genesis() method. Adding a attribute check before opening the url fixes this (for me at least)

TimeoutError

Just installed your plugin, the search works but the download often goes in timeout

calibre, version 5.34.0 (linux, embedded-python: False)
Failed to download e-book: Failed: Downloading Il lupo della steppa (Italian, 94Kb).epub

Starting job: Downloading Il lupo della steppa (Italian, 94Kb).epub 
Job: "Downloading Il lupo della steppa (Italian, 94Kb).epub" failed with error: 
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/mechanize/_urllib2_fork.py", line 1236, in do_open
    h.request(str(req.get_method()), str(req.get_selector()), req.data,
  File "/usr/lib/python3.9/http/client.py", line 1285, in request
    self._send_request(method, url, body, headers, encode_chunked)
  File "/usr/lib/python3.9/http/client.py", line 1331, in _send_request
    self.endheaders(body, encode_chunked=encode_chunked)
  File "/usr/lib/python3.9/http/client.py", line 1280, in endheaders
    self._send_output(message_body, encode_chunked=encode_chunked)
  File "/usr/lib/python3.9/http/client.py", line 1040, in _send_output
    self.send(msg)
  File "/usr/lib/python3.9/http/client.py", line 980, in send
    self.connect()
  File "/usr/lib/python3.9/http/client.py", line 946, in connect
    self.sock = self._create_connection(
  File "/usr/lib/python3.9/socket.py", line 844, in create_connection
    raise err
  File "/usr/lib/python3.9/socket.py", line 832, in create_connection
    sock.connect(sa)
TimeoutError: [Errno 110] Connessione scaduta

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/calibre/calibre/gui2/threaded_jobs.py", line 83, in start_work
    self.result = self.func(*self.args, **self.kwargs)
  File "/usr/lib/calibre/calibre/gui2/ebook_download.py", line 85, in __call__
    dfilename = self._download(cookie_file, url, filename, save_loc, add_to_lib, create_browser)
  File "/usr/lib/calibre/calibre/gui2/ebook_download.py", line 101, in _download
    return download_file(url, cookie_file, filename, create_browser=create_browser)
  File "/usr/lib/calibre/calibre/gui2/ebook_download.py", line 68, in download_file
    with closing(br.open(url)) as r:
  File "/usr/lib/python3/dist-packages/mechanize/_mechanize.py", line 257, in open
    return self._mech_open(url_or_request, data, timeout=timeout)
  File "/usr/lib/python3/dist-packages/mechanize/_mechanize.py", line 287, in _mech_open
    response = UserAgentBase.open(self, request, data)
  File "/usr/lib/python3/dist-packages/mechanize/_opener.py", line 193, in open
    response = urlopen(self, req, data)
  File "/usr/lib/python3/dist-packages/mechanize/_urllib2_fork.py", line 425, in _open
    result = self._call_chain(self.handle_open, protocol, protocol +
  File "/usr/lib/python3/dist-packages/mechanize/_urllib2_fork.py", line 414, in _call_chain
    result = func(*args)
  File "/usr/lib/python3/dist-packages/mechanize/_urllib2_fork.py", line 1258, in http_open
    return self.do_open(HTTPConnection, req)
  File "/usr/lib/python3/dist-packages/mechanize/_urllib2_fork.py", line 1240, in do_open
    raise URLError(err)
urllib.error.URLError: <urlopen error [Errno 110] Connessione scaduta>
 
Called with args: (<calibre.gui2.ui.Main object at 0x7f6b2e7ec5e0>, None, 'http://31.42.184.140/fiction/1605000/eb5e708377e7bc317ca62aa1554b1e19.epub/Hesse%2C%20Hermann%20-%20Il%20lupo%20della%20steppa.epub', 'Il lupo della steppa (Italian, 94Kb).epub', '', True, [], <bound method StorePlugin.create_browser of <calibre_plugins.libgen_fiction.LibgenStore object at 0x7f6b2b66feb0>>) {'notifications': <queue.Queue object at 0x7f6b28321a30>, 'abort': <threading.Event object at 0x7f6b22574520>, 'log': <calibre.utils.logging.GUILog object at 0x7f6b22574700>} 

I noticed that even in the browser sometimes the download take an incredible amount of time, it's not slow ... the download didn't even start for a few minutes then starts and ends in less than a second.

Can you set an higher timeout or use a configurable parameter?

Search doesn't work.

It looks like libgen.rs and .is may have changed the format of the data they're outputting slightly, as no results are being found.

I've fiddleed with the parsing of the Title text in the XPATH data, and gotten it to return SOME results, but download seems to be broken as well.

Language Filtering

I'm looking for a way to filter results by language and/or format. I've tried the following:
def search(self, query): url = self.base_url query_params = { 'q': query, 'criteria': '', 'language': 'English', 'format': 'epub', }

As well as the following in def parse:
if language != "English": return None

I'm wondering if pagination is the issue as usually the first page of search results for libgen.is at least doesn't have English (or French) results. As you can probably tell, I'm not super familiar with python (much more familiar with Java) and am a beginner programmer. I'll keep trying to work it out on my own and will post the solution if I work it out. As far as I can tell, the first option should work.

Downloads failing

I'm consistently getting download fail errors.

Starting job: Downloading War and Peace (English, 1.71Mb).epub 
Job: "Downloading War and Peace (English, 1.71Mb).epub" failed with error: 
Traceback (most recent call last):
  File "calibre/gui2/threaded_jobs.py", line 83, in start_work
  File "calibre/gui2/ebook_download.py", line 85, in __call__
  File "calibre/gui2/ebook_download.py", line 97, in _download
Exception: No file specified to download.
 
Called with args: (<calibre.gui2.ui.Main object at 0x1189e0160>, None, None, 'War and Peace (English, 1.71Mb).epub', '', True, [], <bound method StorePlugin.create_browser of <calibre_plugins.libgen_fiction.LibgenStore object at 0x134bdc970>>) {'notifications': <queue.Queue object at 0x134883700>, 'abort': <threading.Event object at 0x134883820>, 'log': <calibre.utils.logging.GUILog object at 0x134883760>} 

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.