09-07-2013, 12:40 PM | #1801 |
Connoisseur
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. |
09-07-2013, 12:43 PM | #1802 |
Bujavid tekikin
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')] Code:
self.story.setMetadata('siteabbrev','ffnet') 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 |
09-07-2013, 01:02 PM | #1803 | ||
Connoisseur
Posts: 69
Karma: 520
Join Date: Jun 2012
Location: France
Device: Kindle Paperwhite 5 & iPad Mini & Galaxy Tab10
|
Quote:
I've managed to make it work! Quote:
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 |
||
09-07-2013, 01:51 PM | #1804 |
Junior Member
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 |
09-07-2013, 01:55 PM | #1805 |
Bujavid tekikin
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.
|
09-07-2013, 02:26 PM | #1806 |
Enthusiast
Posts: 38
Karma: 10
Join Date: Sep 2013
Device: Kindle Paperwhite, Kindle Keyboard
|
OMG! I LOVE YOU PEOPLE!! It worked!!
|
09-07-2013, 02:29 PM | #1807 |
Connoisseur
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.
|
09-07-2013, 03:56 PM | #1808 |
Plugin Developer
Posts: 6,329
Karma: 3966249
Join Date: Dec 2011
Location: Midwest USA
Device: Kindle Paperwhite(10th)
|
Version 1.7.40 - 07 Sept 2013
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!) |
09-07-2013, 06:17 PM | #1809 |
Connoisseur
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...
|
09-07-2013, 06:21 PM | #1810 |
Mad about the books
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. |
09-07-2013, 09:32 PM | #1811 |
Junior Member
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.
|
09-07-2013, 11:50 PM | #1812 |
Junior Member
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. |
09-07-2013, 11:56 PM | #1813 | |
Plugin Developer
Posts: 6,329
Karma: 3966249
Join Date: Dec 2011
Location: Midwest USA
Device: Kindle Paperwhite(10th)
|
Quote:
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 |
|
09-08-2013, 12:20 AM | #1814 |
Junior Member
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
|
09-08-2013, 03:58 PM | #1815 |
Plugin Developer
Posts: 6,329
Karma: 3966249
Join Date: Dec 2011
Location: Midwest USA
Device: Kindle Paperwhite(10th)
|
Version 1.7.41 - 08 Sept 2013
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[GUI Plugin] Count Pages | kiwidude | Plugins | 1750 | 04-07-2024 01:20 AM |
[GUI Plugin] Open With | kiwidude | Plugins | 403 | 04-01-2024 08:39 AM |
[GUI Plugin] Resize Cover | kiwidude | Plugins | 95 | 03-16-2024 11:55 PM |
[GUI Plugin] Find Duplicates | kiwidude | Plugins | 1096 | 03-16-2024 11:28 PM |
[GUI Plugin] Plugin Updater **Deprecated** | kiwidude | Plugins | 159 | 06-19-2011 12:27 PM |