Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

robots.txt not error. Identifier not an error #179

Merged
merged 1 commit into from
Mar 21, 2023
Merged
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
5 changes: 3 additions & 2 deletions internal/common/identifier.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,8 @@ func GetIdentifierByPath(jsonPath string, jsonld string) (interface{}, error) {
// we need to sort the results
aString := make([]string, len(ys))
for i, v := range ys {
aString[i] = v.(string)
//aString[i] = v.(string)
aString[i] = fmt.Sprint(v) // v not always a single string
}
sort.SliceStable(aString, func(i, j int) bool {
return aString[i] < aString[j]
Expand Down Expand Up @@ -153,7 +154,7 @@ func GenerateIdentifierSha(v1 *viper.Viper, source config.Sources, jsonld string
}
return id, err
} else {
log.Error(config.IdentifierSha, "Action: Getting normalized sha Error:", err)
log.Info(config.IdentifierSha, "Action: Getting normalized sha Error:", err)
// generate a filesha
return GenerateNormalizedSha(v1, jsonld)
}
Expand Down
4 changes: 2 additions & 2 deletions internal/summoner/acquire/resources.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ func ResourceURLs(v1 *viper.Viper, mc *minio.Client, headless bool, db *bolt.DB)
} else {
robots, err = getRobotsForDomain(domain.Domain)
if err != nil {
log.Error("Error getting robots.txt for ", domain.Name, ", continuing without it.")
log.Info("Error getting robots.txt for ", domain.Name, ", continuing without it.")
robots = nil
group = nil
}
Expand Down Expand Up @@ -201,7 +201,7 @@ func getRobotsForDomain(url string) (*robotstxt.RobotsData, error) {
log.Info("Getting robots.txt from ", robotsUrl)
robots, err := getRobotsTxt(robotsUrl)
if err != nil {
log.Error("error getting robots.txt for ", url, ":", err)
log.Info("error getting robots.txt for ", url, ":", err)
return nil, err
}
return robots, nil
Expand Down
2 changes: 1 addition & 1 deletion internal/summoner/acquire/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ func getRobotsTxt(robotsUrl string) (*robotstxt.RobotsData, error) {

resp, err := client.Do(req)
if err != nil {
log.Error("error fetching robots.txt at ", robotsUrl, err)
log.Info("error fetching robots.txt at ", robotsUrl, err)
return nil, err
}

Expand Down