Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Plugins

Notices

Closed Thread
 
Thread Tools Search this Thread
Old 01-28-2014, 12:56 PM   #2386
Emmi
Junior Member
Emmi began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Jan 2014
Device: Laptop at the moment
Hi,
I just came by to let you know, that fanfiction.net appears to have broken down again. I get a
Code:
'NoneType' object has no attribute '__getitem__'
error message when trying to update existing or adding new stories. Other sites seem to be uneffected.

Thank you for your continued work,
Emmi
Emmi is offline  
Old 01-28-2014, 02:17 PM   #2387
JimmXinu
Plugin Developer
JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.
 
JimmXinu's Avatar
 
Posts: 7,025
Karma: 4604635
Join Date: Dec 2011
Location: Midwest USA
Device: Kobo Clara Colour running KOReader
Quote:
Originally Posted by Emmi View Post
Hi,
I just came by to let you know, that fanfiction.net appears to have broken down again.
It's working fine for me.

Do you have specific story URLs it's not working for?

Debug output (run from command line as calibre-debug -g) would also be helpful.
JimmXinu is offline  
Advert
Old 01-28-2014, 02:34 PM   #2388
Emmi
Junior Member
Emmi began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Jan 2014
Device: Laptop at the moment
It happens with all stories I've tried so far.
As for the debuglog:
Code:
calibre Debug log
calibre 1.21 [64bit]  isfrozen: True is64bit: True
Windows-7-6.1.7601-SP1 Windows ('64bit', 'WindowsPE')
('Windows', '7', '6.1.7601')
Python 2.7.5
Windows: ('7', '6.1.7601', 'SP1', 'Multiprocessor Free')
Starting up...
FFDL:DEBUG:calibre_plugins.fanfictiondownloader_plugin.ffdl_plugin(155):Plugin FanFictionDownLoader macmenuhack file_path:C:\Users\Emmi\AppData\Roaming\calibre\plugins\fanfictiondownloader_macmenuhack.txt
Started up in 22.34 seconds with 764 books
FFDL:DEBUG:calibre_plugins.fanfictiondownloader_plugin.ffdl_plugin(722):FanFictionDownLoader v1.8.9
FFDL:DEBUG:calibre_plugins.fanfictiondownloader_plugin.ffdl_plugin(757):url:https://www.fanfiction.net/s/8968909/1/
FFDL:DEBUG:calibre_plugins.fanfictiondownloader_plugin.fanficdownloader.adapters.adapter_fanfictionnet(88):URL: http://www.fanfiction.net/s/8968909/1/
FFDL:DEBUG:calibre_plugins.fanfictiondownloader_plugin.fanficdownloader.adapters.adapter_fanfictionnet(121):=Trying newer chapter: https://www.fanfiction.net/s/8968909/2/
FFDL:WARNING:calibre_plugins.fanfictiondownloader_plugin.fanficdownloader.adapters.base_adapter(182):Caught an exception reading URL: https://www.fanfiction.net/s/8968909/2/  Exception <urlopen error [Errno 8] _ssl.c:504: EOF occurred in violation of protocol>.
FFDL:WARNING:calibre_plugins.fanfictiondownloader_plugin.fanficdownloader.adapters.base_adapter(182):Caught an exception reading URL: https://www.fanfiction.net/s/8968909/2/  Exception <urlopen error [Errno 8] _ssl.c:504: EOF occurred in violation of protocol>.
FFDL:WARNING:calibre_plugins.fanfictiondownloader_plugin.fanficdownloader.adapters.base_adapter(182):Caught an exception reading URL: https://www.fanfiction.net/s/8968909/2/  Exception <urlopen error [Errno 8] _ssl.c:504: EOF occurred in violation of protocol>.
FFDL:WARNING:calibre_plugins.fanfictiondownloader_plugin.fanficdownloader.adapters.base_adapter(182):Caught an exception reading URL: https://www.fanfiction.net/s/8968909/2/  Exception <urlopen error [Errno 8] _ssl.c:504: EOF occurred in violation of protocol>.
FFDL:ERROR:calibre_plugins.fanfictiondownloader_plugin.fanficdownloader.adapters.base_adapter(184):Giving up on https://www.fanfiction.net/s/8968909/2/
FFDL:ERROR:__init__.py(1182):<urlopen error [Errno 8] _ssl.c:504: EOF occurred in violation of protocol>
Traceback (most recent call last):
  File "calibre_plugins.fanfictiondownloader_plugin.fanficdownloader.adapters.base_adapter", line 179, in _fetchUrl
  File "calibre_plugins.fanfictiondownloader_plugin.fanficdownloader.adapters.base_adapter", line 168, in _fetchUrlRaw
  File "urllib2.py", line 404, in open
  File "urllib2.py", line 422, in _open
  File "urllib2.py", line 382, in _call_chain
  File "urllib2.py", line 1222, in https_open
  File "urllib2.py", line 1184, in do_open
URLError: <urlopen error [Errno 8] _ssl.c:504: EOF occurred in violation of protocol>
FFDL:ERROR:calibre_plugins.fanfictiondownloader_plugin.dialogs(600):Exception: {u'comment': u"'NoneType' object has no attribute '__getitem__'", u'publisher': u'www.fanfiction.net', u'begin': None, u'good': False, u'end': None, u'author': [u'rightforlife'], u'url': u'https://www.fanfiction.net/s/8968909/1/', u'listorder': 0, u'author_sort': u'rightforlife', u'comments': u'', u'calibre_id': 872, u'added': False, u'title': u'A Wrinkle in Time'}:'NoneType' object has no attribute '__getitem__'
Traceback (most recent call last):
  File "calibre_plugins.fanfictiondownloader_plugin.dialogs", line 590, in do_loop
  File "calibre_plugins.fanfictiondownloader_plugin.ffdl_plugin", line 823, in prep_download_loop
  File "calibre_plugins.fanfictiondownloader_plugin.fanficdownloader.adapters.base_adapter", line 243, in getStoryMetadataOnly
  File "calibre_plugins.fanfictiondownloader_plugin.fanficdownloader.adapters.adapter_fanfictionnet", line 132, in extractChapterUrlsAndMetadata
TypeError: 'NoneType' object has no attribute '__getitem__'
Emmi is offline  
Old 01-28-2014, 03:01 PM   #2389
JimmXinu
Plugin Developer
JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.
 
JimmXinu's Avatar
 
Posts: 7,025
Karma: 4604635
Join Date: Dec 2011
Location: Midwest USA
Device: Kobo Clara Colour running KOReader
Quote:
Originally Posted by Emmi View Post
It happens with all stories I've tried so far.
As for the debuglog:
Code:
...
Exception <urlopen error [Errno 8] _ssl.c:504: EOF occurred in violation of protocol>
...
That's an SSL error that indicates the response you're getting isn't even valid SSL, let alone HTTP or HTML.

Were you downloading/updating a large (more than 12) number of stories? Because we have seen ffnet throttling requests from users who make too many hits to their servers. (The value of 'too many' is not known.) But I thought they were doing it more gracefully.

Any other causes I try to speculate would only be guesses. In your place, I'd try making sure I could read the stories from a browser, rebooting, and trying from a different network.
JimmXinu is offline  
Old 02-01-2014, 02:01 AM   #2390
Robin42069
Enthusiast
Robin42069 began at the beginning.
 
Posts: 27
Karma: 10
Join Date: Dec 2013
Device: iPad
cant download a story off storiesonine.net

ok i've tried to download this story http://storiesonline.net/s/69347 and i get this message
Status
Title
Author
Comment
URL
Error
The Earl's Man
FantasyLover
list index out of range
http://storiesonline.net/s/69347


i've had no problem downloading anything else really but this one story. can someone explain why it wont work.

heres the debug log as well to help you to tell me if its my problem or just a bug of some sort
Attached Files
File Type: txt tmphcyppj.txt (8.6 KB, 362 views)
Robin42069 is offline  
Advert
Old 02-01-2014, 02:43 AM   #2391
davidfor
Grand Sorcerer
davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.
 
Posts: 24,905
Karma: 47303824
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
Quote:
Originally Posted by Robin42069 View Post
ok i've tried to download this story http://storiesonline.net/s/69347 and i get this message
Status
Title
Author
Comment
URL
Error
The Earl's Man
FantasyLover
list index out of range
http://storiesonline.net/s/69347


i've had no problem downloading anything else really but this one story. can someone explain why it wont work.

heres the debug log as well to help you to tell me if its my problem or just a bug of some sort
It is an error in Chapter 12. There is an extra "</div>" just before the story text. If you open the page, you can see what is happening. The background colour for the story text and the margins are different to the other pages.

I'm not sure how to fix this. I'll have a think and see if I can come up with a solution. Of course, reporting it to the author or the site admin might get the page fixed so that the problem goes away

And for the problem reported earlier in the week, I have fix. But, I haven't had a chance to test it enough. Hopefully tonight.
davidfor is offline  
Old 02-01-2014, 07:15 PM   #2392
Robin42069
Enthusiast
Robin42069 began at the beginning.
 
Posts: 27
Karma: 10
Join Date: Dec 2013
Device: iPad
well damn i didnt think i would get a reply back so soon. and you figured it out quick as well. thanks for the explanation as well. i see what you mean on chapter 12 with the margins and such. i'll drop a email to the site manager to see if they will fix it not sure if they would see the need or not but doesn't hurt to try though. but thank you for the help.
Robin42069 is offline  
Old 02-03-2014, 07:55 AM   #2393
davidfor
Grand Sorcerer
davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.
 
Posts: 24,905
Karma: 47303824
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
Quote:
Originally Posted by JimmXinu View Post
davidfor wrote the adapter for that site, so I'd like to hear from him before doing a permanent solution.

I have attached a version that includes that content, but it might include other stuff that isn't wanted, too.
I have finally had a chance to finish this and test it. The page retrieval code has been rewritten. The problems it fixes include:

- Headings within the story where being stripped
- For multi-page stories, the second page and further were in a div inside the main story div. This worked but it looked wrong.
- Spans used for styles in the story were stripped along with the text they containted.
- Any br tags inside the story were also stripped.

This mainly meant some structure was being lost. The spans were probably the worst bit as if they were used, they tended to be used a lot.

I haven't made any attempt to fix the problem reported on the weekend where there was a "</div>" in the wrong place.

The finestories.com plugin probably should have the same changes, but it will be a few days before I can look at it.
Attached Files
File Type: zip adapter_storiesonlinenet.zip (4.9 KB, 150 views)
davidfor is offline  
Old 02-03-2014, 06:05 PM   #2394
JimmXinu
Plugin Developer
JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.
 
JimmXinu's Avatar
 
Posts: 7,025
Karma: 4604635
Join Date: Dec 2011
Location: Midwest USA
Device: Kobo Clara Colour running KOReader
Here's a test version with davidfor's changes included.

UPDATE Feb 7, 2014 - Remove obsolete beta versions

Last edited by JimmXinu; 02-07-2014 at 10:34 PM. Reason: Remove obsolete beta versions
JimmXinu is offline  
Old 02-04-2014, 12:11 PM   #2395
isubs111
Junior Member
isubs111 began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Feb 2014
Device: Kindle
Suggestion

Hi,

Would it be possible to have a button made for your browser that would grab the current page address and start the download of fanfiction in Calibre without you having to go and copy and paste the address and add the download separately? The button could be saved onto your Favourites bar in Firefox for example. You could maybe also have all your options set and pre-saved so you won't have to go into Calibre to say 'yes' to add to library, etc.

Thanks & kind regards,

Nic
isubs111 is offline  
Old 02-04-2014, 03:00 PM   #2396
TrulyInnovative
Member
TrulyInnovative began at the beginning.
 
Posts: 22
Karma: 10
Join Date: May 2012
Device: Sony PRS-T1
Quote:
Originally Posted by JimmXinu View Post
Here's a test version with davidfor's changes included.
Thanks again to both you and davidfor. Based on a very brief test, this seems to solve the problems I had. The only minor nitpick I have is that there are no colors on the epub, but I don't even know if it's possible to include them. Besides, I mostly read on a black & white reader so that's really not a big issue.
TrulyInnovative is offline  
Old 02-04-2014, 06:29 PM   #2397
Robin42069
Enthusiast
Robin42069 began at the beginning.
 
Posts: 27
Karma: 10
Join Date: Dec 2013
Device: iPad
well damn man. you fixed that one problem with the story margins and now it downloaded the story i wanted so thank you very much. great work!
Robin42069 is offline  
Old 02-04-2014, 07:47 PM   #2398
JimmXinu
Plugin Developer
JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.
 
JimmXinu's Avatar
 
Posts: 7,025
Karma: 4604635
Join Date: Dec 2011
Location: Midwest USA
Device: Kobo Clara Colour running KOReader
Quote:
Originally Posted by isubs111 View Post
Would it be possible to have a button made for your browser that would grab the current page address and start the download of fanfiction in Calibre without you having to go and copy and paste the address and add the download separately? The button could be saved onto your Favourites bar in Firefox for example. You could maybe also have all your options set and pre-saved so you won't have to go into Calibre to say 'yes' to add to library, etc.
Yeah, that would be nice, wouldn't it. But it's not that easy.

Calibre uses the GUI thread as the lock on the database. So there's no way (that I know of) to properly invoke a plugin in the GUI, from outside the GUI.

You could make a bookmarklet that used the FFDL web service version and save it to calibre's auto-add directory. Or use a browser add-on to call the FFDL CLI (or plugin CLI) to download and save it to calibre's auto-add directory. But that wouldn't help with updates and couldn't call the other plugins that FFDL integrates with.
JimmXinu is offline  
Old 02-04-2014, 08:56 PM   #2399
davidfor
Grand Sorcerer
davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.
 
Posts: 24,905
Karma: 47303824
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
Quote:
Originally Posted by TrulyInnovative View Post
Thanks again to both you and davidfor. Based on a very brief test, this seems to solve the problems I had. The only minor nitpick I have is that there are no colors on the epub, but I don't even know if it's possible to include them. Besides, I mostly read on a black & white reader so that's really not a big issue.
The colours are in the stylesheet. If you use the storiesonline stylesheet, it will show them. You can copy that into your personal.ini, but it then gets used for all sites.
davidfor is offline  
Old 02-04-2014, 09:56 PM   #2400
davidfor
Grand Sorcerer
davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.
 
Posts: 24,905
Karma: 47303824
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
Quote:
Originally Posted by Robin42069 View Post
well damn man. you fixed that one problem with the story margins and now it downloaded the story i wanted so thank you very much. great work!
Sorry, but it didn't. It just didn't show throw any errors. All the chapters that are in "Book III" are wrong. The first only has the second page. The others are blank. They all have the same error in the page source.

I haven't looked a how to handle this error yet.
davidfor is offline  
Closed Thread


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[GUI Plugin] Count Pages kiwidude Plugins 1849 08-30-2025 01:22 PM
[GUI Plugin] Resize Cover kiwidude Plugins 100 07-10-2025 08:50 AM
[GUI Plugin] Find Duplicates kiwidude Plugins 1124 04-18-2025 09:19 AM
[GUI Plugin] Open With kiwidude Plugins 404 02-21-2025 05:42 AM
[GUI Plugin] Plugin Updater **Deprecated** kiwidude Plugins 159 06-19-2011 12:27 PM


All times are GMT -4. The time now is 11:55 PM.


MobileRead.com is a privately owned, operated and funded community.