mirror of
https://github.com/briatte/awesome-network-analysis.git
synced 2025-01-05 12:30:53 -05:00
URL checks
This commit is contained in:
parent
2d41719b03
commit
174a742605
60
check.log
60
check.log
@ -1,36 +1,36 @@
|
||||
2017-01-02 19:46:05 : checking 11 URLs
|
||||
2017-03-14 09:04:07 : checking 11 URLs
|
||||
|
||||
http://derekgreene.com/gephitutorial/
|
||||
Status code: 404
|
||||
|
||||
http://nexus.igraph.org/
|
||||
Failed to access
|
||||
|
||||
http://www.derekruths.com/
|
||||
Status code: 403
|
||||
|
||||
http://www.nature.com/nature/journal/v445/n7127/full/445489a.html
|
||||
Status code: 401
|
||||
|
||||
http://www.ssc.wisc.edu/~emirbaye/Mustafa_Emirbayer/ARTICLES_files/manifesto%20for%20a%20relational%20sociology.pdf
|
||||
Status code: 404
|
||||
|
||||
http://www.ssc.wisc.edu/~emirbaye/Mustafa_Emirbayer/ARTICLES_files/network%20analysis,%20culture,%20and%20the%20problem%20of%20agency.pdf
|
||||
Status code: 404
|
||||
|
||||
https://410f84824e101297359cc81c78f45c7c079eb26c.googledrive.com/host/0Bz6WHrWac3FrWnA5MjZqb3lWa2c/
|
||||
Status code: 404
|
||||
|
||||
https://dlist.server.uni-frankfurt.de/mailman/listinfo/sna-de
|
||||
http://asonam.cpsc.ucalgary.ca/
|
||||
Status code: 400
|
||||
|
||||
https://lra.le.ac.uk/bitstream/2381/36068/2/Draft%20BJM%20Revised%20(3rd%20iteration)%20Manuscript.pdf
|
||||
Status code: 501
|
||||
http://comnet.oxfordjournals.org/
|
||||
Failed to access
|
||||
|
||||
https://www.linkedin.com/in/mcculloh
|
||||
Status code: 999
|
||||
http://comnet.oxfordjournals.org/content/4/3/457.short
|
||||
Failed to access
|
||||
|
||||
https://www.puf.com/content/R%C3%A9seaux_sociaux_et_structures_relationnelles
|
||||
Status code: 501
|
||||
http://netzwerkerei.org/
|
||||
Status code: 403
|
||||
|
||||
2017-01-02 19:46:09 : done.
|
||||
http://nexus.igraph.org/
|
||||
Failed to access
|
||||
|
||||
http://www.clementlevallois.net/gephi.html
|
||||
Status code: 404
|
||||
|
||||
http://www.cmh.pro.ens.fr/reseaux-sociaux/
|
||||
Failed to access
|
||||
|
||||
http://www.derekruths.com/
|
||||
Status code: 403
|
||||
|
||||
http://www.esri.com/software/arcgis/extensions/networkanalyst
|
||||
Status code: 403
|
||||
|
||||
http://www.melissaclarkson.com/resources/R_guides/
|
||||
Status code: 500
|
||||
|
||||
http://www.nature.com/nature/journal/v445/n7127/full/445489a.html
|
||||
Status code: 401
|
||||
|
||||
2017-03-14 09:08:15 : done.
|
||||
|
24
check.r
24
check.r
@ -28,8 +28,7 @@ if (!file.exists(f)) {
|
||||
unlist
|
||||
|
||||
# total number of links
|
||||
t <- str_count(u, "http") %>%
|
||||
sum
|
||||
t <- sum(str_count(u, "http"))
|
||||
|
||||
cat(t, "URLs, ")
|
||||
|
||||
@ -50,15 +49,13 @@ if (!file.exists(f)) {
|
||||
|
||||
cat("Source:", f, "\n")
|
||||
|
||||
l <- readLines(f) %>%
|
||||
str_subset("^http")
|
||||
l <- str_subset(readLines(f), "^http")
|
||||
|
||||
cat(length(l), "URLs, ")
|
||||
|
||||
}
|
||||
|
||||
l <- unique(l) %>%
|
||||
sort
|
||||
l <- sort(unique(l))
|
||||
|
||||
cat(length(l), "unique\n")
|
||||
|
||||
@ -68,9 +65,7 @@ sink()
|
||||
|
||||
for (i in l) {
|
||||
|
||||
x <- try(GET(i) %>%
|
||||
status_code,
|
||||
silent = TRUE)
|
||||
x <- try(status_code(GET(i)), silent = TRUE)
|
||||
|
||||
if (!"try-error" %in% class(x) && x != 200) {
|
||||
|
||||
@ -80,7 +75,7 @@ for (i in l) {
|
||||
cat(i, "\nStatus code:", x, "\n\n")
|
||||
sink()
|
||||
|
||||
} else if("try-error" %in% class(x)) {
|
||||
} else if ("try-error" %in% class(x)) {
|
||||
|
||||
cat("?")
|
||||
|
||||
@ -94,8 +89,11 @@ for (i in l) {
|
||||
|
||||
}
|
||||
|
||||
if (!which(l == i) %% 50)
|
||||
if (!which(l == i) %% 50) {
|
||||
|
||||
cat("", length(l) - which(l == i), "left\n")
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -103,6 +101,4 @@ sink(f, append = TRUE)
|
||||
cat(as.character(Sys.time()), ": done.\n")
|
||||
sink()
|
||||
|
||||
cat("\nFound", str_count(readLines(f), "^http") %>%
|
||||
sum,
|
||||
"problems.\n")
|
||||
cat("\nFound", sum(str_count(readLines(f), "^http")), "problems.\n")
|
||||
|
Loading…
Reference in New Issue
Block a user