library("igraph") | |
# Swap out path to your Screaming Frog All Outlink CSV. For Windows, remember to change backslashes to forward slashes. | |
links <- read.csv("C:/Documents/screaming-frog-all-outlinks.csv", skip = 1) # CSV Path | |
# This line of code is optional. It filters out JavaScript, CSS, and Images. Technically you should keep them in there. | |
links <- subset(links, Type=="AHREF") # Optional line. Filter. | |
links <- subset(links, Follow=="true") | |
links <- subset(links, select=c(Source,Destination)) | |
g <- graph.data.frame(links) | |
pr <- page.rank(g, algo = "prpack", vids = V(g), directed = TRUE, damping = 0.85) | |
values <- data.frame(pr$vector) | |
values$names <- rownames(values) | |
row.names(values) <- NULL | |
values <- values[c(2,1)] | |
names(values)[1] <- "url" | |
names(values)[2] <- "pr" | |
# Swap out 'domain' and 'com' to represent your website address. | |
values <- values[grepl("https?:\\/\\/(.*\\.)?domain\\.com.*", values$url),] # Domain filter. | |
# Replace with your desired filename for the output file. | |
write.csv(values, file = "output-pagerank.csv") # Output file. |
This comment has been minimized.
This comment has been minimized.
Thanks for the brief explanation.. |
This comment has been minimized.
This comment has been minimized.
Same issues as SEOForce; I consistently receive "object __ not found" error. Is there any further documentation for this? |
This comment has been minimized.
This comment has been minimized.
I'd suggest adding the following filters too Just make sure to get only 200 anyway, as you don't want to analyse redirectslinks.href<-subset(links,Status.Code=="200") SF mark redirects as 200 in the outbound / inbound exportlinks.href<-subset(links,Anchor!="Redirect") |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Another update, ScreamingFrog started marking hrefs as AHREF and not HREF. This part should also be updated: from |
This comment has been minimized.
This comment has been minimized.
So good |
This comment has been minimized.
This comment has been minimized.
I was curious if anyone is using this now? Any more changes that might need to be made? I am getting only errors. Thanks David |
This comment has been minimized.
This comment has been minimized.
It used to work before but now I keep getting a blank .csv file. The only thing that's changed is that I don't have admin rights on my PC anymore -- could this be the root of the problem? |
This comment has been minimized.
This comment has been minimized.
I just installed R and walked through this process. After some experimentation, I was able to get the script to run, but it only generated a blank CSV. Does anyone have an other ideas? Thanks,. |
This comment has been minimized.
This comment has been minimized.
Hi @pshapiro, could you please uptdate your useful code?
Thankx a lot |
This comment has been minimized.
This comment has been minimized.
Resolved, ;-) |
This comment has been minimized.
This comment has been minimized.
Any updates to SF v. 13? |
This comment has been minimized.
This comment has been minimized.
any updates for this script? |
This comment has been minimized.
This comment has been minimized.
Hi guys, I'm getting these errors:
Any help? |
This comment has been minimized.
Thanks for uploading this, although I could not get it to work. I made all suggested changes but nothing happens on write.