benfortuna / newsagent

An RSS aggregation library
Other
0 stars 1 forks source link

Use the public suffix list to identify feed sources #3

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
A feed doesn't necessarily provide information on the source (ie. 
games.slashdot.org doesn't specify slashdot.org anywhere).

Use the public suffix list to identify the registered domain:

http://publicsuffix.org/list/

Original issue reported on code.google.com by benfortuna on 2 Dec 2011 at 6:06

GoogleCodeExporter commented 9 years ago
Other approaches using regex:

http://stackoverflow.com/questions/983158/remove-subdomain-from-string-in-ruby

Original comment by benfortuna on 2 Dec 2011 at 6:15

GoogleCodeExporter commented 9 years ago
An existing Java library supports this:

http://publicsuffix.sourceforge.net/

Original comment by benfortuna on 2 Dec 2011 at 6:22