steinarb / opds-reader

A calibre plugin containing an OPDS client that can import books into calibre
GNU General Public License v3.0
48 stars 25 forks source link

maybe insufficient recursion before looking for books? #2

Open grimwiz opened 8 years ago

grimwiz commented 8 years ago

When trying to use the "Popular" OPDS from http://m.gutenberg.org/ebooks/?format=opds (used as an example that you can easily reach, my COPS installation triggers the same error) I receive an error that the author attribute cannot be found. My feeling is that the opds-reader is not recursing sufficiently deeply into the XML responses to actually find books, finding a list of categories without books may cause this error.

Error as follows calibre 2.63 embedded-python: True is64bit: True Linux-3.13.0-92-generic-x86_64-with-debian-jessie-sid Linux ('64bit', 'ELF') ('Linux', '3.13.0-92-generic', '#139-Ubuntu SMP Tue Jun 28 20:42:26 UTC 2016') Python 2.7.9 Linux: ('debian', 'jessie/sid', '') Successfully initialized third party plugins: OPDS Client (1, 0, 0) Traceback (most recent call last): File "calibre_plugins.opds_client.main", line 182, in download_opds File "calibre_plugins.opds_client.model", line 97, in downloadOpdsCatalog File "calibre_plugins.opds_client.model", line 143, in makeMetadataFromParsedOpds File "calibre_plugins.opds_client.model", line 149, in opdsToMetadata File "site-packages/calibre/web/feeds/feedparser.py", line 408, in getattr AttributeError: object has no attribute 'author'

steinarb commented 8 years ago

Which branch did you try?

Just master? Or the branch read-feeds-recursively-and-flatten-list?

In the read-feeds-recursively-and-flatten-list branch I have tried to walk OPDS responses from various sources and turn them into something that is useful for the plugin.

But the logic to be able to handle the different OPDS responses became very convoluted, so I just stopped. Maybe there is a better approach? :-)

Patches/pull requests for improvements are welcome!

grimwiz commented 8 years ago

Just master. I will try the other.

On 27 July 2016 15:14:57 BST, steinarb notifications@github.com wrote:

Which branch did you try?

Just master? Or the branch read-feeds-recursively-and-flatten-list?

In the read-feeds-recursively-and-flatten-list branch I have tried to walk OPDS responses from various sources and turn them into something that is useful for the plugin.

But the logic to be able to handle the different OPDS responses became very convoluted, so I just stopped. Maybe there is a better approach? :-)

Patches/pull requests for improvements are welcome!


You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub: https://github.com/steinarb/opds-reader/issues/2#issuecomment-235598255

Sent from my Android device with K-9 Mail. Please excuse my brevity.