// GetArticleForSite is not guaranteed to give good results for all URLs func GetArticleForSite(url string) (string, error) { page, err := utils.GetPage(url) if err != nil { return "", err } article := getArticle(page) return article, nil }
func GetMetaForSite(url string) (Meta, error) { page, err := utils.GetPage(url) if err != nil { return Meta{}, err } meta, err := extractMetaFromSiteData(page, url) if err != nil { return Meta{}, err } return meta, nil }
func ParseURL(url string) (AtomFeed, error) { var atomfeed AtomFeed page, err := utils.GetPage(url) if err != nil { return atomfeed, err } var rssfeed RSSFeed err = rssfeed.ParseFeed(page) if err == nil { af, _ := rssfeed.ConvertToAtomFeed() return af, nil } err = atomfeed.ParseFeed(page) if err != nil { return atomfeed, err } return atomfeed, err }