![]() |
#2596 |
Member
![]() ![]() ![]() ![]() ![]() ![]() Posts: 24
Karma: 540
Join Date: Aug 2010
Device: Kindle 3
|
Hi c.espinosas,
Try this for a recipe for Milenio Diario (mexican newspaper, http://impreso.milenio.com/Nacional/) Although I do not speak Spanish, so there maybe some errors. Spoiler:
Anyone help me on https://www.mobileread.com/forums/sho...postcount=2568 (instructable) ? Regards, Brendan |
![]() |
![]() |
#2597 |
Addict
![]() Posts: 264
Karma: 62
Join Date: May 2010
Device: kindle 2, kindle 3, Kindle fire
|
Wow!!!! This is confusing to say the least... On the page I'm trying to work on howstuffworks the next page sometimes is in pagination other times in top10pagnation (why the heck can't they stay consistent and make my life easier). Anyway, can one of you take at look at http://feeds.feedburner.com/Howstuff...ffDailyRssFeed and tell me how you would solve the multipage issue where the next page doesn't always fall under the same tag structure.
thanks ![]() |
![]() |
Advert | |
|
![]() |
#2598 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 4,004
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
|
Quote:
Code:
soup.find('div',attrs={'class':['pagination', 'top10pagnation']}) |
|
![]() |
![]() |
#2599 |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 800
Karma: 194644
Join Date: Dec 2007
Location: Argentina
Device: Kindle Voyage
|
You are complicating things. This site has printable pages so just add this to your recipe:
Code:
keep_only_tags = [dict(name='div',attrs={'class':'content'})] def print_version(self, url): return url + '/printable' |
![]() |
![]() |
#2600 | |
Addict
![]() Posts: 264
Karma: 62
Join Date: May 2010
Device: kindle 2, kindle 3, Kindle fire
|
Quote:
Here is what I have thus far: For some reason it takes a century to finish even when i use the text command line ![]() Spoiler:
by the way once again THANK YOU FOR DEVOTING YOUR TIME IN HELPING ME. Very much appreciated!!! That goes for others as well. added**** it looks like I gets stuck in a infinite loop notice how it takes and successfully gets the next url then when it goes to the next url it takes and find the url for the previous page. so it goes back to it. then it turns around and goes to the next page again then back and so on ![]() Spoiler:
Last edited by TonytheBookworm; 09-02-2010 at 04:01 PM. Reason: added output from log |
|
![]() |
Advert | |
|
![]() |
#2601 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 4,004
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
|
I copied your two typos, but did it work without the typos? It's "top10Pagination" not "top10pagnation"
Quote:
|
|
![]() |
![]() |
#2602 | |
Addict
![]() Posts: 264
Karma: 62
Join Date: May 2010
Device: kindle 2, kindle 3, Kindle fire
|
Quote:
http://auto.howstuffworks.com/auto-r...-car-feats.htm (unless i'm overlooking something)... Needless to say the multipage thing is both interesting and challenging so I'm definitely learning from you guys.. |
|
![]() |
![]() |
#2603 |
Member
![]() ![]() ![]() ![]() ![]() ![]() Posts: 24
Karma: 540
Join Date: Aug 2010
Device: Kindle 3
|
TonytheBookworm,
The /printable still works on this article. http://auto.howstuffworks.com/auto-r....htm/printable |
![]() |
![]() |
#2604 | |
Addict
![]() Posts: 264
Karma: 62
Join Date: May 2010
Device: kindle 2, kindle 3, Kindle fire
|
Quote:
|
|
![]() |
![]() |
#2605 |
Addict
![]() Posts: 264
Karma: 62
Join Date: May 2010
Device: kindle 2, kindle 3, Kindle fire
|
Okay so the /printable append worked on the autoStuff but the webmaster for whatever reason can't seem to keep a constant format. So When it comes to the other feeds for example Computers. The dang url needs to be modified from..
http://feedproxy.google.com/~r/Howst...icroformat.htm to this http://computer.howstuffworks.com/mi....htm/printable Sure I understand how to change it from previous recipes I have worked on and been helped with. Yet they were consistent. But in this recipe here it is a case of do this for some. then do this for some other then do this for something else. Do I some how call the feeds separately within the recipe ? Like Spoiler:
This recipe here if anyone wants to tackle it with me is very confusing at least to me it is. Because like i say some of its feeds uses this then others use that. nothing stays the same.. Even with the printversion the formating doesn't stay the same like url + /printable in some cases it will be computer.howstuffworks.com/social-networking/blah.html instead of computer.howstuffworks.com/someothercrap/blah.html my guess would be some form of a regexpression... so without further flooding the forum about this recipe if someone out there doesn't mind tackling this by all means do ![]() ![]() thanks again added******* Is there something like a switch in python(beautifulsoup) ? For instance If Feed_title = Auto then do this... Else If Feed_title = computers then do this... Default do this.... I think that would work in this situation because then for each individual feed I could have it do what it needs to do to get the printurl... Last edited by TonytheBookworm; 09-02-2010 at 08:59 PM. Reason: added more question |
![]() |
![]() |
#2606 | |
Addict
![]() Posts: 264
Karma: 62
Join Date: May 2010
Device: kindle 2, kindle 3, Kindle fire
|
Quote:
|
|
![]() |
![]() |
#2607 |
Zealot
![]() ![]() Posts: 115
Karma: 150
Join Date: Jul 2008
Location: Netherlands Veenendaal
Device: Palm T5, Sony PRS-505, Nook Color
|
Problems with nrcnext recipe
Hello All,
Is there anybody who can help me with the builtin nrcnext recipe? I have tried to fix it myself but it looks like it doesn't even start downloading articles so debugging the recipe itself isn't going to work. Following is the output from convert-ebook nrcnext.recipe test --test -vv More 'v' don't add more information Thanks in advance, Joop Resolved conversion options calibre version: 0.7.15 {'asciiize': False, 'author_sort': None, 'authors': None, 'base_font_size': 0, 'book_producer': None, 'change_justification': 'original', 'chapter': None, 'chapter_mark': 'pagebreak', 'comments': None, 'cover': None, 'debug_pipeline': u'test', 'disable_font_rescaling': False, 'dont_download_recipe': False, 'extra_css': None, 'font_size_mapping': None, 'footer_regex': '(?i)(?<=<hr>)((\\s*<a name=\\d+></a>((<img.+?>)*<br>\\s*)?\\d+<br>\\s*.*?\\s*)|(\\s* <a name=\\d+></a>((<img.+?>)*<br>\\s*)?.*?<br>\\s*\\d+))(?=<br>)' , 'header_regex': '(?i)(?<=<hr>)((\\s*<a name=\\d+></a>((<img.+?>)*<br>\\s*)?\\d+<br>\\s*.*?\\s*)|(\\s* <a name=\\d+></a>((<img.+?>)*<br>\\s*)?.*?<br>\\s*\\d+))(?=<br>)' , 'input_encoding': None, 'input_profile': <calibre.customize.profiles.InputProfile object at 0x03C0ECF0>, 'insert_blank_line': False, 'insert_metadata': False, 'isbn': None, 'keep_ligatures': False, 'language': None, 'level1_toc': None, 'level2_toc': None, 'level3_toc': None, 'line_height': 0, 'linearize_tables': False, 'lrf': False, 'margin_bottom': 5.0, 'margin_left': 5.0, 'margin_right': 5.0, 'margin_top': 5.0, 'max_toc_links': 50, 'no_chapters_in_toc': False, 'no_inline_navbars': False, 'output_profile': <calibre.customize.profiles.OutputProfile object at 0x03C0EED0>, 'page_breaks_before': None, 'password': None, 'prefer_metadata_cover': False, 'preprocess_html': False, 'pretty_print': True, 'pubdate': None, 'publisher': None, 'rating': None, 'read_metadata_from_opf': None, 'remove_first_image': False, 'remove_footer': False, 'remove_header': False, 'remove_paragraph_spacing': False, 'remove_paragraph_spacing_indent_size': 1.5, 'series': None, 'series_index': None, 'tags': None, 'test': True, 'timestamp': None, 'title': None, 'title_sort': None, 'toc_filter': None, 'toc_threshold': 6, 'use_auto_toc': False, 'username': None, 'verbose': 6} 1% Converting input to HTML... InputFormatPlugin: Recipe Input running Trying to get latest version of recipe: ncrnext 1% Fetching feeds... 1% Got feeds from index page 1% Trying to download cover... 1% Generating masthead... Synthesizing mastheadImage Python function terminated unexpectedly list index out of range (Error Code: 1) |
![]() |
![]() |
#2608 | |
Junior Member
![]() Posts: 6
Karma: 10
Join Date: Sep 2010
Device: entourage edge
|
Quote:
I already tried it, and works very well. Best, Carlos |
|
![]() |
![]() |
#2609 | |
Junior Member
![]() Posts: 6
Karma: 10
Join Date: Sep 2010
Device: entourage edge
|
Thanks!
Quote:
I already tried it and works very well. Best, Carlos |
|
![]() |
![]() |
#2610 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 4,004
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
|
Quote:
Code:
c: cd \Projects\Calibre\Recipes\AJC ebook-convert AJC_5.recipe AJC_5 --test -vv > AJC.txt :ebook-convert AJC_5.recipe AJC_5.epub> AJC.txt NewRecipeName.txt NewRecipeName_1.recipe and set the batch file to: Code:
c: cd \Projects\Calibre\Recipes\NewRecipeName ebook-convert NewRecipeName_1.recipe NewRecipeName_1 --test -vv > NewRecipeName.txt NewRecipeName_2.recipe and update the batch file to Code:
c: cd \Projects\Calibre\Recipes\NewRecipeName ebook-convert NewRecipeName_2.recipe NewRecipeName_2 --test -vv > NewRecipeName.txt Use the Advanced "Run Windows Program" F10 to run the batch file. with a single key press. Output ends up in the \Projects\Calibre\Recipes\NewRecipeName\NewRecipeN ame_2 folder as html Keep a master recipe open in UltraEdit with all your previously worked out tricks and techniques for simple cut and paste. |
|
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Custom column read ? | pchrist7 | Calibre | 2 | 10-04-2010 02:52 AM |
Archive for custom screensavers | sleeplessdave | Amazon Kindle | 1 | 07-07-2010 12:33 PM |
How to back up preferences and custom recipes? | greenapple | Calibre | 3 | 03-29-2010 05:08 AM |
Donations for Custom Recipes | ddavtian | Calibre | 5 | 01-23-2010 04:54 PM |
Help understanding custom recipes | andersent | Calibre | 0 | 12-17-2009 02:37 PM |