discindo / newscatcher Goto Github PK
View Code? Open in Web Editor NEWProgrammatically collect normalized news from (almost) any website using R
Home Page: http://discindo.github.io/newscatcheR/
License: Other
Programmatically collect normalized news from (almost) any website using R
Home Page: http://discindo.github.io/newscatcheR/
License: Other
as discussed here: https://r-pkgs.org/data.html
Often, the data you include in data/ is a cleaned up version of raw data you’ve gathered from elsewhere. I highly recommend taking the time to include the code used to do this in the source version of your package. This will make it easy for you to update or reproduce your version of the data. I suggest that you put this code in data-raw/. You don’t need it in the bundled version of your package, so also add it to .Rbuildignore. Do all this in one step with:
It is good practice to
✖ fix this R CMD check NOTE:
Note: found 1 marked UTF-8 string
✖ fix this R CMD check WARNING:
LaTeX errors when creating PDF version.
This typically indicates Rd problems.
LaTeX errors found: ! LaTeX Error: File
`inconsolata.sty' not found. Type X to
quit or to proceed, or enter
new name. (Default extension: sty) !
Emergency stop. <read *> l.287 ^^M !
==> Fatal error occurred, no output PDF
file produced!
Hi,
Sorry for opening an issue, not an issue as such, but just to let you know there are quite a few changes in the latest versions of tidyRSS, inclduing a hard dependency on dplyr 1.0.0., in case you start seeing errors all over the place.
Rob
describe_url -- How to check which topics are supported by which newspaper:
and
# URLs by TOPIC
politic_urls = urls(topic = 'politics')
# URLs by COUNTRY
american_urls = urls(country = 'US')
# URLs by LANGUAGE
english_urls = urls(language = 'en')
# Combine any from topic, country, language
american_english_politics_urls = urls(country = 'US', topic = 'politics', language = 'en')
Line 26 in 18468f0
something like
load_sites(".de")
If there is no internet connection, some test cases are failing, these should be skipped.
==> devtools::test()
Loading newscatcheR
Testing newscatcheR
✓ | OK F W S | Context
✓ | 2 | check_url
✓ | 1 | decribe_url
✓ | 21 | filter_urls [0.1 s]
x | 0 1 | get_headlines [3.1 s]
───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
test-get_headlines.R:6: error: get_headlines returns a data frame with one column
Attempt to fetch feed resulted in an error: Could not resolve host: news.ycombinator.com
Backtrace:
1. newscatcheR::get_headlines("ycombinator.com") tests/testthat/test-get_headlines.R:6:2
2. newscatcheR::get_news(website, topic, rss_table) R/get_headlines.R:27:2
3. tidyRSS::tidyfeed(news_source$rss_url) R/get_news.R:51:2
4. tidyRSS:::safe_get(feed, config = ua)
───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
x | 0 1 | get_news [3.0 s]
───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
test-get_news.R:6: error: get_news returns a tibble with feed contents
Attempt to fetch feed resulted in an error: Could not resolve host: news.ycombinator.com
Backtrace:
1. newscatcheR::get_news("ycombinator.com") tests/testthat/test-get_news.R:6:2
2. tidyRSS::tidyfeed(news_source$rss_url) R/get_news.R:51:2
3. tidyRSS:::safe_get(feed, config = ua)
───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
══ Results ════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════
Duration: 6.3 s
OK: 24
Failed: 2
Warnings: 0
Skipped: 0
Prepare for release:
git pull
devtools::build_readme()
urlchecker::url_check()
devtools::check(remote = TRUE, manual = TRUE)
devtools::check_win_devel()
rhub::check_for_cran()
revdepcheck::revdep_check(num_workers = 4)
cran-comments.md
git push
Submit to CRAN:
usethis::use_version('patch')
devtools::submit_cran()
Wait for CRAN...
git push
usethis::use_github_release()
usethis::use_dev_version()
git push
Maybe something about getting the contents of the feed directly with tidyRSS.
It is good practice to
✖ add a "URL" field to
DESCRIPTION. It helps users find
information about your package online.
If your package does not have a
homepage, add an URL to GitHub, or the
CRAN package package page.
✖ add a "BugReports" field to
DESCRIPTION, and point it to a bug
tracker. Many online code hosting
services provide bug trackers for free,
https://github.com, https://gitlab.com,
etc.
✖ avoid long code lines, it is
bad for readability. Also, many people
prefer editor windows that are about 80
characters wide. Try make your lines
shorter than 80 characters
R/get_headlines.R:9:1
R/get_news.R:9:1
✖ not import packages as a
whole, as this can cause name clashes
between the imported packages. Instead,
import only the specific functions you
need.
✖ fix this R CMD check NOTE:
Note: found 1 marked UTF-8 string
✖ fix this R CMD check WARNING:
LaTeX errors when creating PDF version.
This typically indicates Rd problems.
LaTeX errors found: ! LaTeX Error: File
`inconsolata.sty' not found. Type X to
quit or to proceed, or enter
new name. (Default extension: sty) !
Emergency stop. <read *> l.287 ^^M !
==> Fatal error occurred, no output PDF
file produced!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.