Skip to content

Empty description in RSS #21

@artemklevtsov

Description

@artemklevtsov

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>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions