Skip to content

Commit

Permalink
fix atom links #21
Browse files Browse the repository at this point in the history
  • Loading branch information
Robert Myles McDonnell committed Mar 5, 2019
1 parent 2eaad10 commit 59179ce
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: tidyRSS
Type: Package
Title: Tidy RSS for R
Version: 1.2.7
Version: 1.2.8
Author: Robert Myles McDonnell
Maintainer: Robert Myles McDonnell <[email protected]>
Description:
Expand Down
5 changes: 5 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
tidyRSS v1.2.8 (Release date: 05/03/2019)
============
Changes:
Fix to add proper href links in Atom feeds.

tidyRSS v1.2.7 (Release date: 03/11/2018)
============
Changes:
Expand Down
7 changes: 4 additions & 3 deletions R/atom_parse.R
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,16 @@ atom_parse <- function(doc){

res <- tibble::tibble(
feed_title = xml2::xml_text(xml2::xml_find_all(doc, ns = ns, "atom:title")),
feed_link = xml2::xml_text(xml2::xml_find_first(doc, ns = ns, "atom:id")),
feed_link = xml2::xml_attr(xml2::xml_find_first(doc, ns = ns, "atom:link"),
attr = "href"),
feed_author = xml2::xml_text(xml2::xml_find_first(doc, ns = ns, "atom:author")),
feed_last_updated = xml2::xml_text(xml2::xml_find_first(doc, ns = ns, "atom:updated")),
item_title = xml2::xml_text(xml2::xml_find_first(entries, ns = ns, "atom:title")),
item_date_updated = xml2::xml_text(xml2::xml_find_first(entries, ns = ns,
"atom:updated")) %>%
lubridate::parse_date_time(orders = formats),
item_link = xml2::xml_text(xml2::xml_find_first(entries, ns = ns,
"atom:id")),
item_link = xml2::xml_attr(xml2::xml_find_first(entries, ns = ns,
"atom:link"), attr = "href"),
item_content = xml2::xml_text(xml2::xml_find_first(entries, ns = ns, "atom:content"))
)

Expand Down

0 comments on commit 59179ce

Please sign in to comment.