Function for collecting news (title + content) from the media in Benin.

bn_news_contents(start_d, end_d, press = "all")

Arguments

start_d

yyyy-mm-dd start date of collection (oldest date, eg: yesterday)

end_d

yyyy-mm-dd collection end date (newest date, eg: today)

press

specify the name of a press.

Value

a table containing the news (title + content + date publisher + press) collected

Examples

library(afnews) dt_news <- bn_news_contents(start_d="2020-11-01", end_d="2020-11-10", press='all')
#> Done!
#> Warning: No article publish in this period !
#> >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> #> >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> #> >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> #> >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> #> Done!
#> Warning: No article publish in this period !
head(dt_news)
#> [1] date_article url_article title_article #> <0 lignes> (ou 'row.names' de longueur nulle)