Hi,
an error occurs when applying tidyfeed() to the following feed: "https://feed.ksta.de/feed/rss/index.rss". The reason seems to be that in rss_parse() the creation of the object "entries" as a tibble is done such that item_title and item_description need to have the same number of entries. However, this does not seem to be the case for all feeds. The problem is the transformation via unlist(), which does not preserve the length of the original list object created by map(). A possible solution is to pipe the item_description (or any other) object at this stage into the following function:
replace_null <- function(x){
x <- purrr::map(x, ~ replace(.x, is.null(.x), NAcharacter))
purrr::map(x, ~ if(is.list(.x)) replace_null(.x) else .x)
}
But there might be a more efficient way!
Hi, an error occurs when applying tidyfeed() to the following feed: "https://feed.ksta.de/feed/rss/index.rss". The reason seems to be that in rss_parse() the creation of the object "entries" as a tibble is done such that item_title and item_description need to have the same number of entries. However, this does not seem to be the case for all feeds. The problem is the transformation via unlist(), which does not preserve the length of the original list object created by map(). A possible solution is to pipe the item_description (or any other) object at this stage into the following function: replace_null <- function(x){
x <- purrr::map(x, ~ replace(.x, is.null(.x), NAcharacter)) purrr::map(x, ~ if(is.list(.x)) replace_null(.x) else .x) } But there might be a more efficient way!