RobertMyles / tidyRSS

An R package for extracting 'tidy' data frames from RSS, Atom and JSON feeds
https://robertmyles.github.io/tidyRSS/
Other
82 stars 20 forks source link

Fix #61 #62

Closed chainsawriot closed 2 years ago

chainsawriot commented 2 years ago

The fix of #57 makes an assumption that all items contain a description tag. But it is not always the case and for those item map(res_entry, "description", .default = def) will be NA (the def) and the equality operator in the subsequent predicate function dies.

I've included a simple test.

chainsawriot commented 2 years ago

BTW, I think all

map(blah) %>% unlist

can be replaced by

purrr::map_chr(blah)

don't you think?

RobertMyles commented 2 years ago

Hey @chainsawriot , thank you for the PR, much appreciated! I'm really struggling to find time to revisit this problem. As for map(blah) %>% unlist can be replaced by purrr::map_chr(blah), you're probably right, but I think I had something like that previously and I ran into a problem somewhere or other. Let me think about it again.

I'll review your code and I'm running some tests on it and after I'll approve if all goes well.

lgnbhl commented 2 years ago

Hi @chainsawriot, thank you very much for the fix!