09-06-2013, 07:19 PM | #1786 | |
Zealot
Posts: 106
Karma: 3566
Join Date: Aug 2008
Location: London UK
Device: iPhone 5, Kindle K3, Kindle Voyage
|
Quote:
Connect via proxomitron proxy: Spoiler:
Select proxomitron bypass: Spoiler:
Snowman |
|
09-07-2013, 01:14 AM | #1787 |
Junior Member
Posts: 9
Karma: 26
Join Date: Nov 2011
Device: Handspring Visor, Android phones, Nook Color, Calibre
|
I couldn't figure out how to follow what Snowman had done, but figured I'd see if a little googling might help me figure out another way around.
Following up on mentions of a workaround that Jimm made a while back for yourfanfiction, I tracked down the code and added it to my install of the calibre ffdl plugin. In the file adapter_fanfictionnet.py: Original code: Code:
BaseSiteAdapter.__init__(self, config, url) self.story.setMetadata('siteabbrev','ffnet') Code:
BaseSiteAdapter.__init__(self, config, url) ### sgr's attempt to workaround the 403 blocking: ### copied from http://code.google.com/p/fanficdownloader/source/browse/fanficdownloader/adapters/adapter_yourfanfictioncom.py?spec=svn7a2fb1721cc56a125d5713e26a4eec6604d2e32e&r=7a2fb1721cc56a125d5713e26a4eec6604d2e32e # fanfiction.net blocking the default user-agent. # Changing the default user-agent value from: # User-Agent: Python-urllib/2.7 # to a new FFDL-specific user-agent value: self.opener.addheaders = [('User-agent', 'FFDL/1.6')] ### /\ sgr's attempt to workaround the 403 blocking self.story.setMetadata('siteabbrev','ffnet') Hope this is helpful to others! --sgr P.S. Sorry for not having the spoilers thingie working. still learning the editor. Last edited by shesgottaread; 09-07-2013 at 01:19 AM. Reason: add name of changed file. |
Advert | |
|
09-07-2013, 04:04 AM | #1788 |
Occassional Beta Tester
Posts: 283
Karma: 3516
Join Date: Nov 2010
Location: Hungary
Device: Samsung Galaxy Tab 4 (wifi only)
|
|
09-07-2013, 04:47 AM | #1789 |
Connoisseur
Posts: 69
Karma: 520
Join Date: Jun 2012
Location: France
Device: Kindle Paperwhite 5 & iPad Mini & Galaxy Tab10
|
Sorry, but I have to ask...
how/where do I find adapter_fanfictionnet.py to add the code? |
09-07-2013, 04:58 AM | #1790 |
Connoisseur
Posts: 89
Karma: 706
Join Date: Nov 2012
Device: Kobo Touch
|
It's in the FanFictionDownLoader.zip addin bundle in your Calibre installation's plugin folder. On my Windows machine it's in C:\Users\[my user name]\AppData\Roaming\calibre\plugins\FanFictionDownLoa der.zip\fanficdownloader\adapters, I don't know where it would be in a Linux install.
After messing with the contents of this zip you'll need to restart Calibre to make it reload it, similar to how you have to restart Calibre after updating a plugin. Make a backup if you've never messed with python before. If you make a syntax error it can cause the plugin to not load at all, you'll see this if your FFDL toolbar button isn't there when you start Calibre up. Last edited by FaceDeer; 09-07-2013 at 05:02 AM. |
Advert | |
|
09-07-2013, 05:02 AM | #1791 |
Occassional Beta Tester
Posts: 283
Karma: 3516
Join Date: Nov 2010
Location: Hungary
Device: Samsung Galaxy Tab 4 (wifi only)
|
I use Ubuntu linux.
Calibre preferences - Miscellaneous - Open Calibre configuration library. This way you don't have to know the direct path to the plugin folder. |
09-07-2013, 05:15 AM | #1792 |
Pelican
Posts: 19
Karma: 10
Join Date: Sep 2013
Location: Southeast US
Device: Nexus 7 2013
|
Having a spot of trouble with a particular story on fimfiction.com. It updates the .epub file as well as word count, but not the metadata.
http://www.fimfiction.net/story/8932...bit-hard-on-me Code:
calibre, version 1.1.0 ERROR: Error Updating Metadata: <p>An error has occurred while FFDL was updating calibre's metadata for <a href='http://www.fimfiction.net/story/89324/'>Love's Been a Little Bit Hard on Me</a>.</p>The ebook has been updated, but the metadata has not. Traceback (most recent call last): File "calibre_plugins.fanfictiondownloader_plugin.ffdl_plugin", line 1113, in update_books_loop File "calibre_plugins.fanfictiondownloader_plugin.ffdl_plugin", line 1442, in update_metadata File "site-packages\calibre\db\legacy.py", line 458, in set_metadata File "site-packages\calibre\db\cache.py", line 56, in ans File "site-packages\calibre\db\cache.py", line 1115, in set_metadata File "site-packages\calibre\db\cache.py", line 1110, in set_field File "site-packages\calibre\db\cache.py", line 914, in set_field File "site-packages\calibre\db\backend.py", line 1335, in windows_check_if_files_in_use File "site-packages\calibre\utils\filenames.py", line 340, in __init__ |
09-07-2013, 05:16 AM | #1793 | |
Connoisseur
Posts: 69
Karma: 520
Join Date: Jun 2012
Location: France
Device: Kindle Paperwhite 5 & iPad Mini & Galaxy Tab10
|
Quote:
I edited the file with Notepad, but it's asking me to save it, and I cannot seem to be able to save it in the same location. What am I doing wrong? I feel like a cleaner being asked to perform surgery! |
|
09-07-2013, 06:16 AM | #1794 | |
Connoisseur
Posts: 89
Karma: 706
Join Date: Nov 2012
Device: Kobo Touch
|
Quote:
That story downloaded fine for me. The error arose in windows_check_if_files_in_use, which makes me think perhaps you had some other program accessing the story's file at the time, preventing Calibre from writing to it. Do you have your library in a Dropbox folder, for example? There was some stuff about that causing trouble a page or two ago. |
|
09-07-2013, 06:27 AM | #1795 | |
Connoisseur
Posts: 89
Karma: 706
Join Date: Nov 2012
Device: Kobo Touch
|
Quote:
Note, if you've never worked with the Python language before, that the code's indentation level is important. And that the indentation has to be done with the same characters throughout the file (so if the python file uses spaces to indent the other existing lines, your new line needs to use spaces too). This is an easy thing to mess up and Calibre's error message may not be particularly informative if it happens. This little fanfiction crisis is still in very early days, if editing this file continues to prove difficult you could just wait a little while and see if either ffnet removes this blockage or JimmXinu releases an updated version to work around it. I'm betting this wasn't a deliberate effort to block FFDL but rather just an oversight that'll get sorted out in the fullness of time. |
|
09-07-2013, 06:46 AM | #1796 | |
Connoisseur
Posts: 69
Karma: 520
Join Date: Jun 2012
Location: France
Device: Kindle Paperwhite 5 & iPad Mini & Galaxy Tab10
|
Quote:
I'll bear your suggestion in mind and sit on my hands for a while... |
|
09-07-2013, 06:59 AM | #1797 | |
Pelican
Posts: 19
Karma: 10
Join Date: Sep 2013
Location: Southeast US
Device: Nexus 7 2013
|
Quote:
And I do, I forgot I moved it to Dropbox. It's funny that I updated around 30 FiM stories this past week and that's been the only consistent problem. But I relocated the library folder and the story was able to be updated. |
|
09-07-2013, 07:57 AM | #1798 |
Bujavid tekikin
Posts: 139
Karma: 40366
Join Date: Aug 2013
Location: Malaysia
Device: LG G3 D855, Samsung Galaxy Note N7000
|
As recent threads around here have shown, calibre, along with its database and related files, particularly for versions 1.0 and higher absolutely hates and can't tolerate having two different programs accessing files at the same time. Thus having your calibre library in Dropbox, and then doing things while Dropbox's syncing files apparently has similar effects as having two calibre installs accessing the database at the same time-- not pretty.
If you are using Dropbox to backup/sync calibre, pausing Dropbox sync while calibre does its thing should make sure everything works well though. @BaconButty: when you extract the file to edit the plugin, it might also be a good idea to put the extracted file into a non-system folder: I've noticed that trying to edit things in \Roaming doesn't always work, which seems to be because Windows is terrified of the user modifying things in system folders. |
09-07-2013, 10:42 AM | #1799 |
Enthusiast
Posts: 38
Karma: 10
Join Date: Sep 2013
Device: Kindle Paperwhite, Kindle Keyboard
|
Holy crow! So I consider myself fairly adapt at learning things, but I have NO clue how to do what was just explained to fix the solution.
Is there a how to fix Calibre extension for dummies version? thanks |
09-07-2013, 11:47 AM | #1800 | |
Connoisseur
Posts: 69
Karma: 520
Join Date: Jun 2012
Location: France
Device: Kindle Paperwhite 5 & iPad Mini & Galaxy Tab10
|
Quote:
But I'm not usually one to look under the bonnet to find out how things work! See if you can do better (shouldn't be difficult at all!) (With Windows) Open Calibre Maintenance, Advanced, Miscellaneous, Open Calibre Configuration Directory. From there, open as follows: plugins, FanFictionDownLoader.zip, fanficdownloader, adapters. Find the file called adapter_fanfictionnet.py and copy it into your docs. Rename this copy adapter_fanfictionnet (original). Create another copy of the same file in the same location. Open this file with Notepad and find the section of code shown in the repair suggested in shesgottaread's post above. Replace that section of code with the suggested repair code, making sure you respect the spaces and syntax. Before you save and close the file, ensure you update the FFDL version number in the code with the current version (mine says 1.7.39). Save and close. Drag and drop the updated file into the list of adapters opened via Calibre. When prompted by Windows, select to replace the existing file. Close the list of adapters etc. Restart Calibre. If the FFDL icon is missing from its usual place in the toolbar, something has gone wrong. But do not despair, you still have the original adapter_fanfictionnet.py file. Simply go back to your Docs, rename the new adapter_fanfictionnet as adapter_fanfictionnet-repair. Rename the file called adapter_fanfictionnet (original) as adapter_fanfictionnet. Open Calibre Maintenance... as before, then drag and drop the file called adapter_fanfictionnet into the list of adapters. When prompted by Windows, select to replace the existing file. Close the list of adapters etc. Restart Calibre and it should be back to normal, albeit still without a FFN fix... Well, that's how I did it anyway! Maybe someone more used to this can highlight where I went wrong when I tried to fix it... Last edited by BaconButty; 09-07-2013 at 11:50 AM. |
|
|
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 |