Fix crash when scraping data for an app that does not exist
parent
ea8094e028
commit
4beafd233d
|
@ -1,5 +1,9 @@
|
|||
# Change Log
|
||||
|
||||
## v1.1.1 (in-progress)
|
||||
- Fix length of periodic segments on days with DLS
|
||||
- Fix crash when scraping data for an app that does not exist
|
||||
- Add tests for phone screen data
|
||||
## v1.1.0
|
||||
- Add Fitbit calories intraday features
|
||||
## v1.0.1
|
||||
|
|
|
@ -12,9 +12,7 @@ get_genre <- function(apps){
|
|||
|
||||
for(i in seq_along(urls)){
|
||||
try_download <- try(download.file(urls[i], destfiles[i], quiet=TRUE), silent = T)
|
||||
page_title <- read_html(destfiles[i]) %>% html_nodes("title") %>% html_text()
|
||||
|
||||
if(is(try_download,"try-error") || page_title == "Not Found"){
|
||||
if(is(try_download,"try-error") || (read_html(destfiles[i]) %>% html_nodes("title") %>% html_text()) == "Not Found"){
|
||||
genres[i] <- "unknown"
|
||||
}
|
||||
else{
|
||||
|
|
Loading…
Reference in New Issue