Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't parse Google News RSS feed #8

Closed
nsmgr8 opened this issue Apr 27, 2010 · 3 comments
Closed

Can't parse Google News RSS feed #8

nsmgr8 opened this issue Apr 27, 2010 · 3 comments

Comments

@nsmgr8
Copy link

nsmgr8 commented Apr 27, 2010

http://news.google.com/news?output=rss

Cannot be parsed. It halts in debug mode with EXC_BAD_ACCESS.

Following is the debug run output:
run
[Switching to process 10709]
Running…
Program received signal: “EXC_BAD_ACCESS”.
sharedlibrary apply-load-rules all
kill
quit

And the code I tested is following:

NSURL *url = [NSURL URLWithString:@"http://news.google.com/news?output=rss"];
NSError * error;
// NSURL * url = [NSURL URLWithString:@"http://antwrp.gsfc.nasa.gov/apod.rss"];
NSData * data = [NSData dataWithContentsOfURL:url];
FPFeed * feed = [FPParser parsedFeedWithData:data error:&error];
NSLog(@"Title: %@ \n", feed.title);
NSLog(@"Description: %@ \n", feed.feedDescription);
NSLog(@"Date published: %@\n", [feed.pubDate description]);
for (FPItem * item in feed.items)
{
    NSLog(@"\t Item Title: %@", item.title);  
    NSLog(@"\t Item Link: href:%@ \t + rel: %@ + \t type:%@ \t + title:%@", item.link.href, item.link.rel, item.link.type, item.link.title);  
    NSLog(@"\t Item GUID: %@", item.guid);  
    NSLog(@"\t Item Description: %@", item.description);  
}   
@lilyball
Copy link
Owner

This is actually two issues in one. The first issue is that aborting the parse can cause objects to be freed prematurely. The second is that the RSS feed uses a date format that doesn't appear to conform to RFC822 and we don't handle its particular variety yet.

@lilyball
Copy link
Owner

7804f80 fixes the crash. Still working on the other issue.

@lilyball
Copy link
Owner

Support odd date format used by Google News (closed by ad8e8a8)

Google News has a weird quirk with its RSS dates where it gives
every date both a textual timezone as well as a numeric one.
In addition, it adds a separator between the hours and minutes
in the numeric timezone. Neither of these quirks are RFC822-compliant.
We should support them anyway.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants