![]() |
#556 |
Plugin Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,984
Karma: 4604635
Join Date: Dec 2011
Location: Midwest USA
Device: Kobo Clara Colour running KOReader
|
To what end? What do you want to do with this?
|
![]() |
![]() |
#557 |
Connoisseur
![]() Posts: 57
Karma: 10
Join Date: Jul 2012
Device: iPad
|
If this is not in the correct place, I apologize, but I was wondering if there had ever been any interest in supporting the sites www.storiesonline.net and www.Finestories.com?
|
![]() |
![]() |
#558 | |
Zealot
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 139
Karma: 21754
Join Date: Mar 2011
Device: Kindle 3, Icarus Illumina XL, Boyue T62
|
Quote:
Not to mention that both of them by the looks of it already give you an ability to download ebooks. |
|
![]() |
![]() |
#559 |
Connoisseur
![]() Posts: 57
Karma: 10
Join Date: Jul 2012
Device: iPad
|
They do have a means for downloading epubs, but I was hoping to automate my updates. (I have about 45 stories that I am following and would love to be able to get the updates quickly.)
Thanks for looking (and the really fast response!) |
![]() |
![]() |
#560 |
Zealot
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 139
Karma: 21754
Join Date: Mar 2011
Device: Kindle 3, Icarus Illumina XL, Boyue T62
|
How about that - if you ask the admins of those sites and they okay it, I'll consider it =)
|
![]() |
![]() |
#561 |
Connoisseur
![]() Posts: 57
Karma: 10
Join Date: Jul 2012
Device: iPad
|
Email sent to the Admin of SOL, we will see what the response is.
|
![]() |
![]() |
#562 |
hopeless n00b
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 5,110
Karma: 19597086
Join Date: Jan 2009
Location: in the middle of nowhere
Device: PW4, PW3, Libra H2O, iPad 10.5, iPad 11, iPad 12.9
|
Debugging and educational purposes. I've wanted to learn Python for a while now but this is the first project that I'm interested in that actually appears to be within my reach (the site adapters, at least). Would like to create a site adapter for AFF (adultfanfiction.net). If it's not allowed to be included with FFDL, then I'd at least like to write it for my own use. Thanks!
|
![]() |
![]() |
#563 |
Zealot
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 139
Karma: 21754
Join Date: Mar 2011
Device: Kindle 3, Icarus Illumina XL, Boyue T62
|
It's not that it isn't allowed, it is just it's too complicated to do - the site has really overdid itself on the legal warnings, and just a tad bit too ugly to attempt. Plus it appears that they are undergoing a rewrite. Not really ideal for the first adapter, but if you want to try it - go ahead.
The way you going around is is a tad bit ineffective, in my opinion. You will learn very little at staring at the result of someone else's complicated code. The best way to learn how to code is by doing So take some adapter (adapter_castlefansorg.py is as good of a way to start as any given its documentation) and start playing around with it - modifying a part there, a part here to fit certain purposes. Look at the html code of that example website, too, to see why it was coded like that. That's how I've learned, at least. AFF is not efiction of course, which makes a matter tad bit complicated, but at least it will show you what are all the components that go into it. And if upon the compiling you generate an error, and upon staring at it for a couple of minutes (and checking the code at the line specified in the error) you cannot figure the solution - try googling it. If that still doesn't work - feel free to ask us, we'll help to the best of our abilities. And while I'm at it, here is a helpful bit of advise before you do anything. Python fundamentally depends on the proper formatting of the code. Other languages may allow everything to be flushed to the edge, but python would be very confused and yell at you if that were the case. So do keep the same formatting as the code you're modifying - four spaces (not tabs!) per indent. This is something that gave me hell to figure out when I've just started. |
![]() |
![]() |
#564 |
Plugin Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,984
Karma: 4604635
Join Date: Dec 2011
Location: Midwest USA
Device: Kobo Clara Colour running KOReader
|
@ilovejedd - That would be a bit of a hefty feature to add just for playing with.
I think iatheia's advice is better. And I would add: It's much easier to try different things and work on the code in command line than it is in the plugin. In command line, every edit you save is used immediately the next time you run it. In plugin, you have to create the updated plugin zip, install it and restart calibre for every single change. There's a command line interface(CLI) version of FFDL available. If you don't want to install Python separately, after getting and unzipping the CLI version you can use "calibre-debug -e download.py" to run it using calibre's built-in python. When debugging plugins, when I want to see what the HTML from the site looks like before any processing, I find the fetch call (typically "data = self._fetchUrl(url)") and then add a "print(data)" call. Consider that your first step in learning python. ![]() Then run the CLI downloader and redirect it's output to a file. Something like this: Code:
c:\Python27\python.exe downloader.py "http://test1.com?sid=4" > output When testing FFDL output or settings, you can use the dummy site test1.com with story URLs like test1.com?sid=123 That will generate output, but not waste time and bandwidth going out to a real site. |
![]() |
![]() |
#565 | |
Plugin Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,984
Karma: 4604635
Join Date: Dec 2011
Location: Midwest USA
Device: Kobo Clara Colour running KOReader
|
Quote:
It's the blockquote tags. We have two versions of HTML parser that we use for FFDL. One more featured and one more bare bones. We generally prefer to use the bare bones one--it makes fewer mistakes. But one of the things it doesn't do is blockquote tags. I've changed the wraithbait.com adapter to use the more featured html parser and attached it to the earlier post. Try it out and see if a) it fixes that story and b) if it breaks any others. Jim |
|
![]() |
![]() |
#566 | |||||
hopeless n00b
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 5,110
Karma: 19597086
Join Date: Jan 2009
Location: in the middle of nowhere
Device: PW4, PW3, Libra H2O, iPad 10.5, iPad 11, iPad 12.9
|
Quote:
I've been viewing a couple of FFDL adapters and dokuga.com seems to be the closest match. As for being ineffective, well it works for me. Viewing code examples and seeing what they do is generally how I learn a language. Needless to say, Calibre's code is too complicated for me but the FFDL code doesn't appear to be too daunting. This is why I'd prefer to be able to see step by step output. Quote:
Quote:
Quote:
Quote:
Thanks! |
|||||
![]() |
![]() |
#567 | ||
Plugin Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,984
Karma: 4604635
Join Date: Dec 2011
Location: Midwest USA
Device: Kobo Clara Colour running KOReader
|
Quote:
Quote:
I suppose you could add some kind of caching mechanism to the _fetch routines in adapters/base_adapter.py. Not sure how accurately it could replicate real sites, though. |
||
![]() |
![]() |
#568 | |||
Plugin Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,984
Karma: 4604635
Join Date: Dec 2011
Location: Midwest USA
Device: Kobo Clara Colour running KOReader
|
Quote:
Quote:
A lot of it was just that I didn't want to deal with a site that felt the need to be that lawyered up. To the point that I've never gone past the scary DOB/'signature' page that includes warnings such as: Quote:
|
|||
![]() |
![]() |
#569 | |
hopeless n00b
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 5,110
Karma: 19597086
Join Date: Jan 2009
Location: in the middle of nowhere
Device: PW4, PW3, Libra H2O, iPad 10.5, iPad 11, iPad 12.9
|
Quote:
|
|
![]() |
![]() |
#570 |
Plugin Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,984
Karma: 4604635
Join Date: Dec 2011
Location: Midwest USA
Device: Kobo Clara Colour running KOReader
|
Yep. Me too. If they feel it necessary to put that much legalese on it, it makes me uncomfortable to provide a way to bypass it.
|
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
[GUI Plugin] Resize Cover | kiwidude | Plugins | 100 | 07-10-2025 08:50 AM |
[GUI Plugin] Count Pages | kiwidude | Plugins | 1844 | 05-25-2025 11:24 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 |