![]() |
#2266 |
Pelican
![]() Posts: 19
Karma: 10
Join Date: Sep 2013
Location: Southeast US
Device: Nexus 7 2013
|
I was using the commented out info just for examples. And thanks Facedeer, your answer helped me see where I was going wrong. I was going into configure FFDL and the custom column tag when I should have just updated the metadata. Silly mistake in hindsight but I appreciate both your and JimmXinu's help.
![]() |
![]() |
![]() |
#2267 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 24,905
Karma: 47303824
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
|
Quote:
![]() The formatting of the epubs produced has a problem. This is because the story text is wrapped in a single p tag. It uses br tags to create the impression of paragraphs. The adapter passes the text through utf8FromSoup and will use replace_br_with_p if the users options have it set. But, because the text is wrapped in a single set of paragraph tags, nothing is changed. To get it working right, I had to strip the tags off. At line 200 is: Code:
story1 = soup1.find('div', 'b-story-body-x') storytext = self.utf8FromSoup(url, story1) Code:
story1 = soup1.find('div', 'b-story-body-x') story1 = str(story1.find('div').p) story1 = story1[len('<p>'):len(story1) - len('</p>')] story1 = bs.BeautifulSoup(story1) storytext = self.utf8FromSoup(url, story1) This of course doesn't take into account having the "replace_br_with_p" set to false. In that case, the paragraph tag probably should be put back. |
|
![]() |
Advert | |
|
![]() |
#2268 | |
Plugin Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 7,027
Karma: 4604637
Join Date: Dec 2011
Location: Midwest USA
Device: Kobo Clara Colour running KOReader
|
Quote:
This version also adds more sleep time between hits to ffnet for metadata. I think that may help people who are getting errors from ffnet; I suspect it's because they are doing too many downloads/updates at once. However, that also means it takes longer for FFDL to get metadata before pushing downloads into the background. I'm not convinced that this is worth the extra time it will cost people who aren't attempting mass downloads/updates. Let me know what you think. UPDATE Dec 17, 2013 -- Remove obsolete beta versions (Look for a newer version in more recent posts.) Last edited by JimmXinu; 12-17-2013 at 07:47 PM. Reason: Remove obsolete beta versions |
|
![]() |
![]() |
#2269 |
Connoisseur
![]() Posts: 57
Karma: 10
Join Date: Jul 2012
Device: iPad
|
I was doing some random testing of the Literotica adapter and encountered this error.
'NoneType' object has no attribute '__getitem__' http://www.literotica.com/s/you-dont-choose-love I have encountered this on several stories, but this is the only one that I remembered to write down. Also, I cannot seem to get the "are you an adult" dialogue to go away. My personal.ini entry is (username and password deleted): [Literotica.com] username:XXXXXX password:XXXXXX collect_series: true is_adult:true Am I doing something wrong here? |
![]() |
![]() |
#2270 | ||
Plugin Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 7,027
Karma: 4604637
Join Date: Dec 2011
Location: Midwest USA
Device: Kobo Clara Colour running KOReader
|
Quote:
Quote:
This adapter doesn't use user/pass or the collect_series option. The decision to treat 'series' as multi-chapter stories was made by the original adapter author. Since they all seem to be name XXX Ch 01, etc, it seems the right call to me. UPDATE Dec 17, 2013 -- Remove obsolete beta versions (Look for a newer version in more recent posts.) Last edited by JimmXinu; 12-17-2013 at 11:47 PM. Reason: Remove obsolete beta versions |
||
![]() |
Advert | |
|
![]() |
#2271 |
Connoisseur
![]() Posts: 57
Karma: 10
Join Date: Jul 2012
Device: iPad
|
Seems to work just fine now. The case change in the personal.ini fixed that right up. Whatever you did on the other error seems to have solved it. I have only had time for some quick and dirty testing, but I will give it a better test tonight or in the morning, and if anything else comes up I will be sure to mention it.
thanks |
![]() |
![]() |
#2272 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 24,905
Karma: 47303824
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
|
It works, but, for the replace_br_with_p to work, it needs the paragraph tag that wraps the text removed. The conversion to string and then the substring was because I couldn't work out a way to get BeautifulSoup to give me the contents of the paragraph as a BeautifulSoup object that utf8FromSoup would work on.
|
![]() |
![]() |
#2273 | |
Plugin Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 7,027
Karma: 4604637
Join Date: Dec 2011
Location: Midwest USA
Device: Kobo Clara Colour running KOReader
|
Quote:
I tested both with and without replace_br_with_p and both looked fine to me. |
|
![]() |
![]() |
#2274 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 24,905
Karma: 47303824
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
|
I picked a story from the author that rlh3 posted: http://www.literotica.com/s/down-drinking-at-the-bar. The choice was simply that it had a short first paragraph.
When I look at the code your version is producing, at the start I see: Code:
<h3>Down Drinking at the Bar</h3> <div> <p>Joe Morrison wasn't particularly happy. His wife, who had been much too fond of drink had developed Korsakov, and she'd been in a care centre for years. He usually visited her in the afternoons.<br /> <br /> Life was lonely at home; it had been lonely for as long as he could remember. There were a few comforts he'd stuck to, all those years: his collection of poetry, string quartets, a dram before bed and the barmaid at the Rose and Crown.<br /> <br /> . . . "Didn't you hear? He drove into tree. Must've been dead at once."<br /> <br /> "Oh no," Polly said. She slumped down with her arms on the bar, put her head on her arms and cried.</p> </div> Code:
<h3>Down Drinking at the Bar</h3> <div> <p>Joe Morrison wasn't particularly happy. His wife, who had been much too fond of drink had developed Korsakov, and she'd been in a care centre for years. He usually visited her in the afternoons.</p> <p>Life was lonely at home; it had been lonely for as long as he could remember. There were a few comforts he'd stuck to, all those years: his collection of poetry, string quartets, a dram before bed and the barmaid at the Rose and Crown.</p> . . . <p>"Didn't you hear? He drove into tree. Must've been dead at once."</p> <p>"Oh no," Polly said. She slumped down with her arms on the bar, put her head on her arms and cried.</p> </div> When I look at the method replace_br_with_p, I found the following comment: Code:
# Find all bexisting blocks with p, pre and blockquote tags, we need to shields break tags inside those. |
![]() |
![]() |
#2275 | |
Plugin Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 7,027
Karma: 4604637
Join Date: Dec 2011
Location: Midwest USA
Device: Kobo Clara Colour running KOReader
|
Quote:
However, I don't have a big enough sample set to know if all literotica stories use <br><br> paragraph breaks. If this still doesn't satisfy, we'll have to get Asbjørn to look at changing replace_br_with_p--that's his baby and I treat it like a black box. I'm not willing to put conditionals in individual adapters for replace_br_with_p. UPDATE Jan 4, 2013 - Remove obsolete beta versions Last edited by JimmXinu; 01-04-2014 at 02:59 PM. Reason: Remove obsolete beta versions |
|
![]() |
![]() |
#2276 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 24,905
Karma: 47303824
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
|
That looks good. And from a look around, they all seem to be formatted in exactly the same way.
And I can't blame you about replace_br_with_p. I had a quick look and it has far to many and complex regex's for my liking. Luckily the comments gave me an idea of what was happening. |
![]() |
![]() |
#2277 |
Connoisseur
![]() Posts: 57
Karma: 10
Join Date: Jul 2012
Device: iPad
|
In continued testing of the Literotica adapter, I have found that the "get story URLs to download from web page" function does not work. I just discovered this function, and thought to try it.
This is the error message I get: Spoiler:
If this in functionality that is not going to be supported, then no big deal, but I thought that I would mention it. |
![]() |
![]() |
#2278 |
Plugin Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 7,027
Karma: 4604637
Join Date: Dec 2011
Location: Midwest USA
Device: Kobo Clara Colour running KOReader
|
Good catch. It will be fixed in the next version.
|
![]() |
![]() |
#2279 |
Evangelist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 408
Karma: 1050547
Join Date: Mar 2011
Device: Kindle Oasis 2
|
Hey there Jimm!
Just letting you know that I still enjoy your plugin and love that you are so actively developing it. I'm really thankful for your continued work. Greetings! |
![]() |
![]() |
#2280 |
Plugin Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 7,027
Karma: 4604637
Join Date: Dec 2011
Location: Midwest USA
Device: Kobo Clara Colour running KOReader
|
|
![]() |
![]() |
|
![]() |
||||
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 |