Anyone still use MagpieRSS?

Discussion in 'XML & RSS' started by Jeebus, Apr 24, 2007.

  1. #1
    I've been messing around with a personal site for awhile now that basically parses around 500 rss feeds. I use magpierss, however, whenever an unknown character comes up in a feed, magpie returns the character as a question mark. It usually happens with quotes and apostrophes. I've tried changing the charset that magpie outputs the feeds in, and also tried changing the charset on my page, but so far nothing. I'm going through the magpie code now to see if i can add a str_replace to replace any potentially unknown characters with recognizable ones and was just wondering if anyone has come across this problem before? And if so, has anyone come up with a solution for it?

    Example, this shows up on my site:
    Judge Excludes Defendant?s Statements in Sex Abuse Case


    As opposed to the original headline:
    Judge Excludes Defendant’s Statements in Sex Abuse Case

    Thanks
     
    Jeebus, Apr 24, 2007 IP
  2. weppos

    weppos Well-Known Member

    Messages:
    99
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    125
    #2
    I have used MagpieRss for a long time and charset encoding was one of the worst problems.
    Did you try other parser, for example www.simplepie.org ?
     
    weppos, Apr 25, 2007 IP
  3. pedrotuga

    pedrotuga Peon

    Messages:
    162
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #3
    I've used magpie for a long time and i had those issues. I am the kind of programmer that doesn't worry about those little things until they become critical.
    Cant tell you how did i went around those problems but i fixed them, i remember.

    The thing with the feeds is not so much about the parser, you basically need to look into the feed source and check which encode does it comes with, some feeds come with html, some don't, some come with simple text but use html entities, it's basically a big mess.

    Going for another parser wont solve your problems, sorry to tell you this but you will have to analyze case by case.
     
    pedrotuga, Apr 25, 2007 IP
  4. Weirfire

    Weirfire Language Translation Company

    Messages:
    6,979
    Likes Received:
    365
    Best Answers:
    0
    Trophy Points:
    280
    #4
    I've been using Magpie RSS and the reason I'm posting in this thread is that just today when my website tries to call the rss_fetch.inc file the whole page freezes up and nothing prints after this line of code.

    Anyone else ever had this problem?
     
    Weirfire, May 15, 2007 IP
  5. pedrotuga

    pedrotuga Peon

    Messages:
    162
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #5
    I never had such problems.
    I suspect one of your feeds might not be online anymore.

    wraping the feed parsing in a try... catch block is a good programming practice and avoid the cript execution to crash completly.
     
    pedrotuga, May 22, 2007 IP
  6. DW1

    DW1 Peon

    Messages:
    111
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #6
    I use MagpieRSS for FeedFury.com which handles reading of about 10 feeds per second. I believe I had to change one or two default encodings to UTF8 and modify the script to output errors the way I wanted, but apart from that it works great! :D
     
    DW1, May 23, 2007 IP
  7. lifeform

    lifeform Peon

    Messages:
    1
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #7
    Hi

    I'm having the same problems with faulthy encoding now. Any IDEA on why this is a problem?

    All the encodings in the MagpieRSS-module folder has been changed to ISO-8859-1 which is the default encoding for Norway.

    Getting outputs like this;

    * - Det handlar om innstilling
    * Full fyr i stova
    * Innbrotsraid på Radøy
    * Første brev til Humørbygda
    * Torbjørn Dalland


    These should contain the norwegian charchaters æ, ø and å.

    Maybe something in the CSS-files for the site template?
     
    lifeform, Feb 27, 2008 IP
  8. angilina

    angilina Notable Member

    Messages:
    7,824
    Likes Received:
    186
    Best Answers:
    0
    Trophy Points:
    260
    #8
    I am trying to use Magpie, but I get this error

    "Warning: MagpieRSS: Failed to parse RSS file. (> required at line 13, column 142) in /home/content/rss_fetch.inc on line 238
    Site:

    Warning: Invalid argument supplied for foreach() in /home/content/index.php on line 16"
     
    angilina, Feb 29, 2008 IP
  9. pedrotuga

    pedrotuga Peon

    Messages:
    162
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #9
    on my rss_fetch.inc, line 238 is actually a comment.
    Maybe it's better to post line 238 in here.

    It might be worth opening a new topic for this too.
     
    pedrotuga, Mar 3, 2008 IP
  10. Weirfire

    Weirfire Language Translation Company

    Messages:
    6,979
    Likes Received:
    365
    Best Answers:
    0
    Trophy Points:
    280
    #10
    Are you sure you have the right path to the file you're trying to parse?
     
    Weirfire, Mar 19, 2008 IP
  11. mmpiece

    mmpiece Peon

    Messages:
    1
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #11
    Hi, Magpie default output is ISO-8859-1... as most of the feeds are utf-8, I've changed line 359 of rss_fetch.inc putting:

    define('MAGPIE_OUTPUT_ENCODING', 'utf-8');
    instead of
    define('MAGPIE_OUTPUT_ENCODING', 'ISO-8859-1');

    This works for me... clearly remember to set page charset as utf-8 (on html page that shows your content):

    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

    ciao
     
    mmpiece, Jul 10, 2008 IP
  12. bilirkishi

    bilirkishi Well-Known Member

    Messages:
    213
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    103
    #12
    the problem still continues... :(
     
    bilirkishi, Sep 30, 2008 IP
  13. TheSyndicate

    TheSyndicate Prominent Member

    Messages:
    5,410
    Likes Received:
    289
    Best Answers:
    0
    Trophy Points:
    365
    #13
    Sorry i do not know your answer to the problem but there is always problem with the maggie. What can you use otherwise?
     
    TheSyndicate, Sep 30, 2008 IP
  14. juust

    juust Peon

    Messages:
    214
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    0
    #14
    simplepie seems most active.

    php parsers :
    webresourcesdepot list

    carp by gecko tribe,
    he teamed up with a professional programmer so it might be worth checking out
    (unless you don't like geckos)

    I always use a custom script (tag parser).
     
    juust, Oct 3, 2008 IP
  15. ShayneSherman

    ShayneSherman Peon

    Messages:
    93
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #15
    Interesting. I was having the same issues and i racked my brain to figure out how to fix it. I almost scraped it altogether!
     
    ShayneSherman, Dec 15, 2008 IP