Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
^\.travis\.yml$
^LICENSE$
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ Authors@R: person("Salim", "Khalil", email = "khalilsalim1@gmail.com",
role = c("aut", "cre"), comment = c(ORCID = "0000-0002-7804-4041"))
Description: Performs parallel web crawling and web scraping. It is designed to crawl, parse and store web pages to produce data that can be directly used for analysis application. For details see Khalil and Fakir (2017) <DOI:10.1016/j.softx.2017.04.004>.
License: GPL (>=2)
Encoding: UTF-8
URL: https://github.com/salimk/Rcrawler/
BugReports: https://github.com/salimk/Rcrawler/issues
LazyData: TRUE
Imports: httr, xml2, data.table, foreach, doParallel, parallel, selectr, webdriver, callr, jsonlite
RoxygenNote: 6.1.0
4 changes: 2 additions & 2 deletions R/LinkNormalization.R
Original file line number Diff line number Diff line change
Expand Up @@ -86,11 +86,11 @@ LinkNormalization<-function(links, current){

# if sarts with subdomain
} else if(substr(links[t],1,7)!="http://" && substr(links[t],1,8)!="https://" && substr(links[t],1,3)!="www"
&& grepl( pattern = paste0("[A-Za-z]*",gsub("([.|()\\^{}+$*?]|\\[|\\])", "\\\\\\1", paste0(".",base2),".*")), x = links[t], ignore.case = TRUE)){
&& grepl( pattern = paste0("[A-Za-z]*",gsub("([.|()\\^{}+$*?]|\\[|\\])", "\\\\\\1", paste0(".",base2)),".*"), x = links[t], ignore.case = TRUE)){
links[t]<-paste0(protocole,"//",links[t])
# if relative
} else if(substr(links[t],1,7)!="http://" && substr(links[t],1,8)!="https://" && substr(links[t],1,3)!="www"
&& !grepl( pattern = paste0(".*",gsub("([.|()\\^{}+$*?]|\\[|\\])", "\\\\\\1",base2,".*")), x = links[t], ignore.case = TRUE) ){
&& !grepl( pattern = paste0(".*",gsub("([.|()\\^{}+$*?]|\\[|\\])", "\\\\\\1",base2),".*"), x = links[t], ignore.case = TRUE) ){
if(substring(current, nchar(current)) == "/"){
links[t]<-paste0(current,links[t])
# si non
Expand Down