Re: LazyLibrarian: Automate your ebook/author collection
Posted: February 5th, 2013, 4:29 pm
Hi
Today i tried to add a new author which worked as planned ("George R.R. Martin")
Then i tried to add "Stephen King" - i entered "King" as search term and a lot of kings showed up but when i tried to add "Stephen King" with the "add author" button i ran in a similar error (which ended in the freezing of LL - webgui was reacting but no activity in the python window)
But in my case it was:
Exception in thread DBIMPORT:
Traceback (most recent call last):
File "/usr/lib/python2.7/threading.py", line 551, in __bootstrap_inner
self.run()
File "/usr/lib/python2.7/threading.py", line 504, in run
self.__target(*self.__args, **self.__kwargs)
File "/home/herman/LazyLibrarian-1/lazylibrarian/importer.py", line 100, in addAuthorToDB
author = GR.find_author_id()
SAME LIKE YOURS BUT:
File "/home/herman/LazyLibrarian-1/lazylibrarian/gr.py", line 37, in find_author_id
rootxml = sourcexml.getroot()
UnboundLocalError: local variable 'sourcexml' referenced before assignment
This comes from the python window - LL log states only
05-Feb-2013 22:12:22 - INFO :: DBIMPORT : Searching for author with name: {'id': 'Stephen King'}
05-Feb-2013 22:12:24 - ERROR :: DBIMPORT : Error fetching authorid: syntax error: line 1, column 0
------------
Besided that i noticed 2 more problems:
Search:
i added some books to the wanted list but search isnt downloading any nzbs -
So i checked out the log and found
05-Feb-2013 22:33:07 - DEBUG :: SEARCHBOOKS : Searching NZB's at provider https://newzb.net/ ...
05-Feb-2013 22:33:07 - INFO :: SEARCHBOOKS : Searching for Brent Weeks. at: https://newzb.net/
05-Feb-2013 22:33:12 - DEBUG :: SEARCHBOOKS : Parsing results from <a href="https://newzb.net//api?q=Brent+Weeks&ap ... zb.net/</a>
(i changed the apikey but i double checked and its correct)
When i take the link from the logs https://newzb.net//api?q=Brent+Weeks&ap ... 1&cat=7020 and open it in the browser a XML is shown containing multiple items like:
<item>
<title>
Weeks, Brent - Night Angel Trilogy, The 03 - Beyond the Shadows
</title>
<guid isPermaLink="true">
https://newzb.net/details/093cc05208561 ... 6c99f1488b
</guid>
<link>
https://newzb.net/getnzb/093cc052085611 ... r=REPLACED
</link>
<comments>
https://newzb.net/details/093cc05208561 ... b#comments
</comments>
<pubDate>Thu, 17 Jan 2013 07:52:09 +0000</pubDate>
<category>Books > Ebook</category>
<description>
Weeks, Brent - Night Angel Trilogy, The 03 - Beyond the Shadows
</description>
<enclosure url="https://newzb.net/getnzb/093cc052085611 ... r=REPLACED" length="1385395" type="application/x-nzb"/>
<newznab:attr name="category" value="7000"/>
<newznab:attr name="category" value="7020"/>
<newznab:attr name="size" value="1385395"/>
<newznab:attr name="guid" value="093cc0520856118eb953016c99f1488b"/>
<newznab:attr name="files" value="2"/>
<newznab:attr name="poster" value=""Windsword" <[email protected]>"/>
<newznab:attr name="grabs" value="0"/>
<newznab:attr name="comments" value="0"/>
<newznab:attr name="password" value="0"/>
<newznab:attr name="usenetdate" value="Thu, 17 Jan 2013 00:20:49 +0000"/>
<newznab:attr name="group" value="alt.binaries.ebook"/>
</item>
So it seems that somehow the results arent processed correctly
Search Providers
While checking the Logs i found out that somehow the searchproviders got messed up -
i have setup 2 newznab providers with the correct api key but LL uses the api key from provider 1 for provider 2 as well although in the Webui and the config ini its stated correctly
Thanks once more for your great work
KR Camelrider
Today i tried to add a new author which worked as planned ("George R.R. Martin")
Then i tried to add "Stephen King" - i entered "King" as search term and a lot of kings showed up but when i tried to add "Stephen King" with the "add author" button i ran in a similar error (which ended in the freezing of LL - webgui was reacting but no activity in the python window)
But in my case it was:
Exception in thread DBIMPORT:
Traceback (most recent call last):
File "/usr/lib/python2.7/threading.py", line 551, in __bootstrap_inner
self.run()
File "/usr/lib/python2.7/threading.py", line 504, in run
self.__target(*self.__args, **self.__kwargs)
File "/home/herman/LazyLibrarian-1/lazylibrarian/importer.py", line 100, in addAuthorToDB
author = GR.find_author_id()
SAME LIKE YOURS BUT:
File "/home/herman/LazyLibrarian-1/lazylibrarian/gr.py", line 37, in find_author_id
rootxml = sourcexml.getroot()
UnboundLocalError: local variable 'sourcexml' referenced before assignment
This comes from the python window - LL log states only
05-Feb-2013 22:12:22 - INFO :: DBIMPORT : Searching for author with name: {'id': 'Stephen King'}
05-Feb-2013 22:12:24 - ERROR :: DBIMPORT : Error fetching authorid: syntax error: line 1, column 0
------------
Besided that i noticed 2 more problems:
Search:
i added some books to the wanted list but search isnt downloading any nzbs -
So i checked out the log and found
05-Feb-2013 22:33:07 - DEBUG :: SEARCHBOOKS : Searching NZB's at provider https://newzb.net/ ...
05-Feb-2013 22:33:07 - INFO :: SEARCHBOOKS : Searching for Brent Weeks. at: https://newzb.net/
05-Feb-2013 22:33:12 - DEBUG :: SEARCHBOOKS : Parsing results from <a href="https://newzb.net//api?q=Brent+Weeks&ap ... zb.net/</a>
(i changed the apikey but i double checked and its correct)
When i take the link from the logs https://newzb.net//api?q=Brent+Weeks&ap ... 1&cat=7020 and open it in the browser a XML is shown containing multiple items like:
<item>
<title>
Weeks, Brent - Night Angel Trilogy, The 03 - Beyond the Shadows
</title>
<guid isPermaLink="true">
https://newzb.net/details/093cc05208561 ... 6c99f1488b
</guid>
<link>
https://newzb.net/getnzb/093cc052085611 ... r=REPLACED
</link>
<comments>
https://newzb.net/details/093cc05208561 ... b#comments
</comments>
<pubDate>Thu, 17 Jan 2013 07:52:09 +0000</pubDate>
<category>Books > Ebook</category>
<description>
Weeks, Brent - Night Angel Trilogy, The 03 - Beyond the Shadows
</description>
<enclosure url="https://newzb.net/getnzb/093cc052085611 ... r=REPLACED" length="1385395" type="application/x-nzb"/>
<newznab:attr name="category" value="7000"/>
<newznab:attr name="category" value="7020"/>
<newznab:attr name="size" value="1385395"/>
<newznab:attr name="guid" value="093cc0520856118eb953016c99f1488b"/>
<newznab:attr name="files" value="2"/>
<newznab:attr name="poster" value=""Windsword" <[email protected]>"/>
<newznab:attr name="grabs" value="0"/>
<newznab:attr name="comments" value="0"/>
<newznab:attr name="password" value="0"/>
<newznab:attr name="usenetdate" value="Thu, 17 Jan 2013 00:20:49 +0000"/>
<newznab:attr name="group" value="alt.binaries.ebook"/>
</item>
So it seems that somehow the results arent processed correctly
Search Providers
While checking the Logs i found out that somehow the searchproviders got messed up -
i have setup 2 newznab providers with the correct api key but LL uses the api key from provider 1 for provider 2 as well although in the Webui and the config ini its stated correctly
Thanks once more for your great work
KR Camelrider