Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Empty description in RSS #21

Open
artemklevtsov opened this issue Sep 24, 2020 · 0 comments
Open

Empty description in RSS #21

artemklevtsov opened this issue Sep 24, 2020 · 0 comments

Comments

@artemklevtsov
Copy link

Feed example: https://www.wjakethompson.com/publication/index.xml

> feedeR::feed.extract("https://www.wjakethompson.com/publication/index.xml")
Error in item$description[[1]] : subscript out of bounds
Calls: <Anonymous> ... lapply -> FUN -> tibble -> tibble_quos -> eval_tidy
Execution halted
> traceback()
9: eval_tidy(xs[[j]], mask)
8: tibble_quos(xs[!is.null], .rows, .name_repair)
7: tibble(title = item$title[[1]], date = date, link = if (is.null(item$origLink)) item$link[[1]] else item$origLink[[1]], 
       description = item$description[[1]])
6: FUN(X[[i]], ...)
5: lapply(feed[names(feed) == "item"], function(item) {
       if (is.null(item$title)) 
           return(NULL)
       date = if (is.null(item$pubDate)) 
           NA
       else parse.date(item$pubDate)
       if (is.na(suppressWarnings(as.integer(date)))) 
           return(NULL)
       tibble(title = item$title[[1]], date = date, link = if (is.null(item$origLink)) 
           item$link[[1]]
       else item$origLink[[1]], description = item$description[[1]])
   })
4: list2(...)
3: bind_rows(lapply(feed[names(feed) == "item"], function(item) {
       if (is.null(item$title)) 
           return(NULL)
       date = if (is.null(item$pubDate)) 
           NA
       else parse.date(item$pubDate)
       if (is.na(suppressWarnings(as.integer(date)))) 
           return(NULL)
       tibble(title = item$title[[1]], date = date, link = if (is.null(item$origLink)) 
           item$link[[1]]
       else item$origLink[[1]], description = item$description[[1]])
   }))
2: parse.rss(feed)
1: feedeR::feed.extract("https://www.wjakethompson.com/publication/index.xml")

Feed part:

> curl -s https://www.wjakethompson.com/publication/index.xml | tail
      <title>Transcranial direct current stimulation as a possible intervention tool for emotion regulation in depression</title>
      <link>https://wjakethompson.com/publication/2013-frontiers-tdcs/</link>
      <pubDate>Sat, 01 Jun 2013 00:00:00 +0000</pubDate>
      
      <guid>https://wjakethompson.com/publication/2013-frontiers-tdcs/</guid>
      <description></description>
    </item>
    
  </channel>
</rss>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant