10-21-2010, 09:58 PM | #1 |
Junior Member
Posts: 7
Karma: 10
Join Date: Oct 2010
Device: Kindle
|
Occasional Garbled Characters using this recipe
Using a Kindle 3 and latest version of Calibre. The attached recipe for The Columbus Dispatch returns several articles from RSS feeds with funky characters, especially lots of squares. I've noticed several others with similar problems with different feeds and it seems there might not be an answer - hoping that one of you with .py experience would at least look at the attached recipe i downloaded from the archive to see if there's an issue with it. I have also tried to use the basic mode and just let Calibre create the recipe after i add feeds individually -- those download as messages about flash, the article text, but everything is justified center. Thanks for any guidance anyone may have. I'm not a programmer, so any help is appreciated.
|
10-22-2010, 12:43 AM | #2 |
Enjoying the show....
Posts: 14,270
Karma: 10462841
Join Date: Jun 2008
Location: Arizona
Device: A K1, Kindle Paperwhite, an Ipod, IPad2, Iphone, an Ipad Mini & macAir
|
Welcome to MobileRead, Bullpeeper
Someone should be along soon with some suggestions. Enjoy the forums. |
Advert | |
|
10-22-2010, 11:02 AM | #3 |
Wizard
Posts: 4,004
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
|
Do the "squares" appear only on the Kindle? Do you see them in the Calibre viewer?
|
10-22-2010, 07:05 PM | #4 |
Junior Member
Posts: 7
Karma: 10
Join Date: Oct 2010
Device: Kindle
|
Thanks, Starson17. The corrupt articles don't have squares in the Calibre viewer but are garbled text. Here's a sample:
������_����K���XIďż˝8ďż˝ k;@��������.ďż˝H3I��4Zďż˝WVVÇ �� ďż˝?+2ďż˝z+���utux�����Yďż˝ď ż˝[��yt{ďż˝sz{qÎŞďż˝ �ڑ�1ďż˝e���Q��c��²��Y=ďż˝ď ż˝ďż˝lEV�� ďż˝qďż˝A9ďż˝o����fďż˝'��w_��Vďż˝ďż ˝6ďż˝$ďż˝/���x��*?���Hďż˝ďż˝ďż˝ďż˝ďż˝ďż˝ďż˝ď ż˝ďż˝ŮĄĎŁďż˝Q����E|2ďż˝a�����8ďż ˝ďż˝ďż˝ďż˝ďż˝ďż˝ďż˝ďż˝l ��Jďż˝yďż˝H����!~����qďż˝ďż˝ďż ˝ďż˝(����꼳V]X��ڸ��E&ďż˝ y��n�������Zďż˝|$����� 5���&{�� |
10-22-2010, 08:07 PM | #5 |
Wizard
Posts: 4,004
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
|
|
Advert | |
|
10-22-2010, 10:53 PM | #6 |
Junior Member
Posts: 7
Karma: 10
Join Date: Oct 2010
Device: Kindle
|
I've noticed that a particular article will have garbled text one day and if that article happens to come down in the next day's feed as well, sometimes the text will be fine. I would say that it's different articles, but a day has to go by. If i fetch the same recipe in the same day, the same article will have garbled text ... thanks.
|
10-23-2010, 10:31 AM | #7 | |
Wizard
Posts: 4,004
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
|
Quote:
|
|
10-23-2010, 06:25 PM | #8 |
Junior Member
Posts: 7
Karma: 10
Join Date: Oct 2010
Device: Kindle
|
Got it, and thanks! When i use Calibre's basic method for creating a news source, by just pasting in the Dispatch's rss link, what fetching produces comes out as all of the text, but justified center. There are also java script and/or flash messages which seem to have something to do with ads at the beginning of many articles. If there are anti-ad recipe elements you know of, please post or link. I'm not a programmer but I'm picking up how some of this works just by comparing recipes that work well with mine that don't.
|
10-24-2010, 09:37 AM | #9 |
Wizard
Posts: 4,004
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
|
I finally had time to look at this.
Most of your links from the RSS feed work normally, but occasionally a link like this: Code:
http://www.dispatch.com/live/content/local_news/stories/2010/10/24/an-illusion-of-treatment.html?sid=101 Code:
http://www.dispatchpolitics.com/live/content/local_news/stories/2010/10/24/copy/an-illusion-of-treatment.html?adsec=politics&sid=101 This is done by adding a <meta http-equiv="refresh"> tag to the code. Add this to your recipe to prevent it: Code:
remove_tags.append(dict(name = 'meta', attrs = {'http-equiv': 'refresh'})) Last edited by Starson17; 10-24-2010 at 09:46 AM. |
10-25-2010, 09:28 PM | #10 |
creator of calibre
Posts: 43,859
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Another way to do it is with
Code:
def get_browser(self): br = BasicNewsRecipe.get_browser(self) br.set_handle_refresh(False) return br |
10-26-2010, 09:27 AM | #11 |
Wizard
Posts: 4,004
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
|
Thanks! I didn't think of that option. For my personal reference, as I sometimes search here for bits of code I recall but can't find, there are other optional settings for Mechanize and a list can be found here:
http://wwwsearch.sourceforge.net/mechanize/ |
10-30-2010, 08:39 PM | #12 |
Junior Member
Posts: 7
Karma: 10
Join Date: Oct 2010
Device: Kindle
|
Thanks
|
10-30-2010, 08:42 PM | #13 | |
Junior Member
Posts: 7
Karma: 10
Join Date: Oct 2010
Device: Kindle
|
Thanks!
Quote:
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Garbled characters and advertising in feeds | lordvetinari2 | Recipes | 3 | 10-20-2010 11:48 AM |
garbled screen among other issues | quibard | PocketBook | 8 | 07-13-2010 03:27 AM |
PRS-600 Garbled screen | edlauzon | Sony Reader | 8 | 07-07-2010 07:59 AM |
Last character in Nook library garbled | Sanddancer | Calibre | 3 | 06-21-2010 03:19 PM |
Garbled TXT | SamCox | Amazon Kindle | 0 | 02-20-2010 10:39 PM |