Register Guidelines E-Books Search Today's Posts Mark Forums Read

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

Notices

Closed Thread
 
Thread Tools Search this Thread
Old 09-07-2013, 12:40 PM   #1801
FaceDeer
Connoisseur
FaceDeer will become famous soon enoughFaceDeer will become famous soon enoughFaceDeer will become famous soon enoughFaceDeer will become famous soon enoughFaceDeer will become famous soon enoughFaceDeer will become famous soon enoughFaceDeer will become famous soon enough
 
Posts: 89
Karma: 706
Join Date: Nov 2012
Device: Kobo Touch
I can simplify the workaround steps for everyone a bit. Here's a link to a modified copy of adapter_fanfictionnet.py. Just open your FanFictionDownLoader.zip file as described above and replace the existing one with this one and when you restart Calibre it should work; I tested it locally and it works for me. I only added the one extra line to modify FFDL's user agent.

Thanks, shesgottaread, for digging up this fix in the first place (and JimmXinu for putting up with us flailing around in this thread like this . I'm sure this will get sorted out soon, in the meantime this can tide over anyone with a more urgent need for a little light reading.
FaceDeer is offline  
Old 09-07-2013, 12:43 PM   #1802
Sefiriot
Bujavid tekikin
Sefiriot writes the songs that make the whole world sing.Sefiriot writes the songs that make the whole world sing.Sefiriot writes the songs that make the whole world sing.Sefiriot writes the songs that make the whole world sing.Sefiriot writes the songs that make the whole world sing.Sefiriot writes the songs that make the whole world sing.Sefiriot writes the songs that make the whole world sing.Sefiriot writes the songs that make the whole world sing.Sefiriot writes the songs that make the whole world sing.Sefiriot writes the songs that make the whole world sing.Sefiriot writes the songs that make the whole world sing.
 
Sefiriot's Avatar
 
Posts: 139
Karma: 40366
Join Date: Aug 2013
Location: Malaysia
Device: LG G3 D855, Samsung Galaxy Note N7000
Edit: Annnnd NINJA'D by FaceDeer! LOL! I'll just leave the slightly simplified working here for anyone who's feeling adventurous.


@BaconButty: I think the problem might've been that your block indentation went pear-shaped: it can happen when typing code in or opening the file in the editor, if you're not careful.

The basic steps you detailed are pretty much correct, though you can do it in fewer.

A gentle reminder to all users: calibre should be closed before mucking in the configuration directory.

Open calibre's configuration directory, select the FFDL ZIP and copy it elsewhere for insurance against mistakes. Next open up the ZIP, go to where the adapter file is located in it, and open it directly from the ZIP archive in a text/code editor.

Tip: It helps if you associate the .py file extension beforehand to the text/code editor you want to use. My weapon of choice is Notepad++; others on various platforms may like Sublime Text, Text Editor, SciTE, Kate, emacs, vi, etc.

Search for the code fragment that's to be replaced. If you want to play it safe, copy the altered code directly as provided in shesgottaread's post, and replace the two lines indicated with the altered version. Otherwise you can strip all the comments (lines starting with #) and just add the one line changing the user agent string, as FaceDeer did above.

Whichever you do, make very sure the code aligns correctly. (This is also why you will want to use something other than Notepad for this.) You may see that the comments (the lines beginning with #) may not quite align. That seems to be fine. In practice what it means is that this line:

Code:
self.opener.addheaders = [('User-agent', 'FFDL/1.6')]
needs to be at the same level of indentation as this line:

Code:
self.story.setMetadata('siteabbrev','ffnet')
This is because of how Python delimits its code blocks (see this for explanations). The three lines of code in shesgottaread's post form a single code block.

Don't forget to change the 'FFDL/1.6' to 'FFDL/1.7.39'. Save your work. WinRAR or 7zip might ask if you want to save the changed file to the archive. Say yes. Open up calibre and see if the FFDL plugin is working. If it's not there, you've stuffed something up-- close calibre and try again. If you've gotten it all right it should be there as usual.

Test if you can download an FFDL story. If it works, congrats, you've successfully modified the plugin.

Last edited by Sefiriot; 09-07-2013 at 12:49 PM. Reason: trimmed post for length
Sefiriot is offline  
Advert
Old 09-07-2013, 01:02 PM   #1803
BaconButty
Connoisseur
BaconButty will become famous soon enoughBaconButty will become famous soon enoughBaconButty will become famous soon enoughBaconButty will become famous soon enoughBaconButty will become famous soon enoughBaconButty will become famous soon enough
 
Posts: 69
Karma: 520
Join Date: Jun 2012
Location: France
Device: Kindle Paperwhite 5 & iPad Mini & Galaxy Tab10
Quote:
Originally Posted by FaceDeer View Post
I can simplify the workaround steps for everyone a bit. Here's a link to a modified copy of adapter_fanfictionnet.py. Just open your FanFictionDownLoader.zip file as described above and replace the existing one with this one and when you restart Calibre it should work; I tested it locally and it works for me. I only added the one extra line to modify FFDL's user agent.
Thanks, shesgottaread, for digging up this fix in the first place (and JimmXinu for putting up with us flailing around in this thread like this . I'm sure this will get sorted out soon, in the meantime this can tide over anyone with a more urgent need for a little light reading.
Thank you so much!
I've managed to make it work!


Quote:
Originally Posted by Sefiriot View Post
@BaconButty: I think the problem might've been that your block indentation went pear-shaped: it can happen when typing code in or opening the file in the editor, if you're not careful.
The basic steps you detailed are pretty much correct, though you can do it in fewer.
Thanks for the tip
I'm sure there's a much easier way to get there, but it feels not quite so daunting when I can see it step by step
BaconButty is offline  
Old 09-07-2013, 01:51 PM   #1804
ratgirl72
Junior Member
ratgirl72 began at the beginning.
 
Posts: 1
Karma: 10
Join Date: Sep 2013
Device: calibre
I've been having a problem the last 2 days with fanfiction downloader. I try to update stories, I enter the url, select "new chapters epub" and I get this message.


Status
Title
Author
Comment
URL
Bad
Unknown
Unknown
HTTP Error 403: Forbidden
http://www.fanfiction.net/s/7725527/1/

I've tried different stories, different sites-same thing every time. I've restarted calibre in debug mode, restarted my computer-nothing works. I can download in standalone version of Fanfiction downloader, but not in calibre. I have calibre 1.1 (most recent version) and downloaded most recent version of FanFiction Downloader. I use Google Chrome and Windows XP. I browsed the forum, and apparently I'm not the only one who has had this issue recentl, but no one seemed to have any answers. Please help!

Lisa
ratgirl72 is offline  
Old 09-07-2013, 01:55 PM   #1805
Sefiriot
Bujavid tekikin
Sefiriot writes the songs that make the whole world sing.Sefiriot writes the songs that make the whole world sing.Sefiriot writes the songs that make the whole world sing.Sefiriot writes the songs that make the whole world sing.Sefiriot writes the songs that make the whole world sing.Sefiriot writes the songs that make the whole world sing.Sefiriot writes the songs that make the whole world sing.Sefiriot writes the songs that make the whole world sing.Sefiriot writes the songs that make the whole world sing.Sefiriot writes the songs that make the whole world sing.Sefiriot writes the songs that make the whole world sing.
 
Sefiriot's Avatar
 
Posts: 139
Karma: 40366
Join Date: Aug 2013
Location: Malaysia
Device: LG G3 D855, Samsung Galaxy Note N7000
Ah, Lisa, the temporary solution we've found to the problem is 3 posts above you, in FaceDeer's post. Or you can try looking at mine, which is basically "how-to DIY" FaceDeer's solution.
Sefiriot is offline  
Advert
Old 09-07-2013, 02:26 PM   #1806
leckadams
Enthusiast
leckadams began at the beginning.
 
Posts: 38
Karma: 10
Join Date: Sep 2013
Device: Kindle Paperwhite, Kindle Keyboard
OMG! I LOVE YOU PEOPLE!! It worked!!
leckadams is offline  
Old 09-07-2013, 02:29 PM   #1807
FaceDeer
Connoisseur
FaceDeer will become famous soon enoughFaceDeer will become famous soon enoughFaceDeer will become famous soon enoughFaceDeer will become famous soon enoughFaceDeer will become famous soon enoughFaceDeer will become famous soon enoughFaceDeer will become famous soon enough
 
Posts: 89
Karma: 706
Join Date: Nov 2012
Device: Kobo Touch
It's always nice to have the option of knowing how something works, even if you don't necessarily need to know. I spent an evening familiarizing myself with how these site adapters work a few days back for unrelated reasons, and now when I encounter bugs in the future I'm hoping that I'll be able to present a working solution along with my report of the problem's existence. Maybe this peek under the hood will inspire others to do likewise.
FaceDeer is offline  
Old 09-07-2013, 03:56 PM   #1808
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: 6,283
Karma: 3966249
Join Date: Dec 2011
Location: Midwest USA
Device: Kindle Paperwhite(10th)
Version 1.7.40 - 07 Sept 2013
  • Better doc section override order in ini files.
  • Fix for calibre pre-1.0.0.
  • Additional series as site specific data for AO3.
  • Fixes for changes to harrypotterfanfictioncom.
  • Add User-agent="FFDL/1.7" for all adapters for fanfiction.net changes.
    (Remove from specific adapters.)

Thanks to all the users who've helped out while I've been occupied. Somethings in RL just have to take precedence.

The latest version should work again for everybody.

(Post doing 70mph down the Interstate--computing at the speed of traffic!)
JimmXinu is offline  
Old 09-07-2013, 06:17 PM   #1809
BaconButty
Connoisseur
BaconButty will become famous soon enoughBaconButty will become famous soon enoughBaconButty will become famous soon enoughBaconButty will become famous soon enoughBaconButty will become famous soon enoughBaconButty will become famous soon enough
 
Posts: 69
Karma: 520
Join Date: Jun 2012
Location: France
Device: Kindle Paperwhite 5 & iPad Mini & Galaxy Tab10
Thank you to all who have helped find a solution to the latest FFN problem and thank you to JimmXinu for the update...
BaconButty is offline  
Old 09-07-2013, 06:21 PM   #1810
bouvin
Mad about the books
bouvin began at the beginning.
 
Posts: 8
Karma: 10
Join Date: Apr 2012
Device: Kindle Paperwhite
FFDL not updating (some) updated stories

Hi

(Using 1.7.40 with Calibre 1.2.0)

I just noticed a few of the fics I'm following on fimfiction.net were not being downloaded, despite being updated on the site. The error log stated the following:

maximum recursion depth exceeded while calling a Python object
http://www.fimfiction.net/story/2593/

(when trying to Update Existing FanFiction Book(s)…)

FFDL has been happily downloading other updated fics, but I have seen this behavior with one other fic, and the common denominator between them is that they are both quite long stories, so that might be a clue. If I delete the fic and download it fresh, there is no problem, so FFDL's ability to download the fic is not in question.

Cheers
- Niels Olof

Last edited by bouvin; 09-07-2013 at 06:27 PM.
bouvin is offline  
Old 09-07-2013, 09:32 PM   #1811
shesgottaread
Junior Member
shesgottaread began at the beginning.
 
Posts: 9
Karma: 26
Join Date: Nov 2011
Device: Handspring Visor, Android phones, Nook Color, Calibre
Thank you to FaceDeer and Sefiriot for explaining how to implement the fix, and JimmXinu for the new version, and putting the inspiration and code out there in the first place. My apologies for not having given clearer instructions when I'd posted, guess that's what comes of late-night hacking.
shesgottaread is offline  
Old 09-07-2013, 11:50 PM   #1812
th_ing
Junior Member
th_ing began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Sep 2013
Device: Kobo glo
Hi, I'm completely new so I apologise if I'm doing something wrong. I updated FFDL through calibre to v1.7.40 and now I can't download from AO3. It's basically the only site I've used it for so far and I had downloaded a fanfic before I updated it and it worked fine, but now it keeps on saying that none of the urls can be/need to be updated.

I hadn't used it for FF.net yet but I downloaded something from that site to see if it worked and it was fine.

I do not understand Python at all so I don't know what's wrong with it. My calibre is updated to the latest version and I ran it through debug mode.

Code:
calibre Debug log
calibre 1.2  isfrozen: True is64bit: False
Windows-8-6.2.9200 Windows ('32bit', 'WindowsPE')
('Windows', '8', '6.2.9200')
Python 2.7.4
Windows: ('8', '6.2.9200', '', 'Multiprocessor Free')
Starting up...
Plugin FanFictionDownLoader macmenuhack file_path:C:\Users\...\AppData\Roaming\calibre\plugins\fanfictiondownloader_macmenuhack.txt
style:
macmenuhack file_path:C:\Users\...\AppData\Roaming\calibre\plugins\fanfictiondownloader_macmenuhack.txt
DEBUG:    0.0 No Kobo Touch, Glo or Mini appears to be connected
Started up in 5.64 seconds with 2116 books
FanFictionDownLoader v1.7.40
url:http://archiveofourown.org/works/941734
FFDL:INFO:calibre_plugins.fanfictiondownloader_plugin.fanficdownloader.adapters.adapter_archiveofourownorg(136):url: http://archiveofourown.org/works/941734/navigate?view_adult=true
FFDL:INFO:calibre_plugins.fanfictiondownloader_plugin.fanficdownloader.adapters.adapter_archiveofourownorg(137):metaurl: http://archiveofourown.org/works/941734?view_adult=true
FFDL:DEBUG:calibre_plugins.fanfictiondownloader_plugin.fanficdownloader.adapters.adapter_archiveofourownorg(183):numChapters: (2)
Exception: {u'comment': u"'NoneType' object has no attribute 'findAll'", u'begin': None, u'good': False, u'end': None, u'author': [u'Unknown'], u'url': u'http://archiveofourown.org/works/941734', u'listorder': 0, u'author_sort': [u'Unknown'], u'comments': u'', u'calibre_id': None, u'added': False, u'title': u'Unknown'}:'NoneType' object has no attribute 'findAll'
Traceback (most recent call last):
  File "calibre_plugins.fanfictiondownloader_plugin.dialogs", line 551, in do_loop
  File "calibre_plugins.fanfictiondownloader_plugin.ffdl_plugin", line 788, in prep_download_loop
  File "calibre_plugins.fanfictiondownloader_plugin.fanficdownloader.adapters.base_adapter", line 242, in getStoryMetadataOnly
  File "calibre_plugins.fanfictiondownloader_plugin.fanficdownloader.adapters.adapter_archiveofourownorg", line 291, in extractChapterUrlsAndMetadata
AttributeError: 'NoneType' object has no attribute 'findAll'
Fetched metadata for 1 of 1

Last edited by th_ing; 09-08-2013 at 12:21 AM.
th_ing is offline  
Old 09-07-2013, 11:56 PM   #1813
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: 6,283
Karma: 3966249
Join Date: Dec 2011
Location: Midwest USA
Device: Kindle Paperwhite(10th)
Quote:
Originally Posted by th_ing View Post
Hi, I'm completely new so I apologise if I'm doing something wrong. I updated FFDL through calibre to v1.7.40 and now I can't download from AO3. It's basically the only site I've used it for so far and I had downloaded a fanfic before I updated it and it worked fine, but now it keeps on saying that none of the urls can be/need to be updated.
AO3 support broke in 1.7.40 for stories with no series when adding support for multiple series. I don't use AO3 practically at all and I guess my testers missed that case too. Sorry.

Here's a fixed version to tide you over until I can do a new release tomorrow.

UPDATE Sep 14 2013 - Remove obsolete beta versions

Last edited by JimmXinu; 09-14-2013 at 06:11 PM. Reason: Remove obsolete beta versions
JimmXinu is offline  
Old 09-08-2013, 12:20 AM   #1814
th_ing
Junior Member
th_ing began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Sep 2013
Device: Kobo glo
Yay, it works. I love this plugin since I read a lot of fanfiction so I'm very grateful. Thanks so much
th_ing is offline  
Old 09-08-2013, 03:58 PM   #1815
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: 6,283
Karma: 3966249
Join Date: Dec 2011
Location: Midwest USA
Device: Kindle Paperwhite(10th)
Version 1.7.41 - 08 Sept 2013
  • Fix for AO3 stories without any series.
JimmXinu is offline  
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[GUI Plugin] Resize Cover kiwidude Plugins 95 03-16-2024 11:55 PM
[GUI Plugin] Open With kiwidude Plugins 402 03-16-2024 11:44 PM
[GUI Plugin] Find Duplicates kiwidude Plugins 1096 03-16-2024 11:28 PM
[GUI Plugin] Count Pages kiwidude Plugins 1744 03-02-2024 05:39 PM
[GUI Plugin] Plugin Updater **Deprecated** kiwidude Plugins 159 06-19-2011 12:27 PM


All times are GMT -4. The time now is 09:36 AM.


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