Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
crawl
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ale
crawl
Commits
df800e15
Commit
df800e15
authored
7 years ago
by
ale
Browse files
Options
Downloads
Patches
Plain Diff
Provide better defaults for command-line options
Defaults that are more suitable to real-world site archiving.
parent
b06b0cd4
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
README.md
+2
-2
2 additions, 2 deletions
README.md
cmd/crawl/crawl.go
+8
-8
8 additions, 8 deletions
cmd/crawl/crawl.go
with
10 additions
and
10 deletions
README.md
+
2
−
2
View file @
df800e15
...
...
@@ -34,8 +34,8 @@ The crawling scope is controlled with a set of overlapping checks:
prefix is implicitly ignored)
*
maximum crawling depth can be controlled with the
*--depth*
option
*
resources related to a page (CSS, JS, etc) will always be fetched,
even if on external domains,
if
the
*--
in
clude-related*
option
is
specified
even if on external domains,
unless
the
*--
ex
clude-related*
option
is
specified
If the program is interrupted, running it again with the same command
line from the same directory will cause it to resume crawling from
...
...
This diff is collapsed.
Click to expand it.
cmd/crawl/crawl.go
+
8
−
8
View file @
df800e15
...
...
@@ -26,13 +26,13 @@ import (
)
var
(
dbPath
=
flag
.
String
(
"state"
,
"crawldb"
,
"crawl state database path"
)
keepDb
=
flag
.
Bool
(
"keep"
,
false
,
"keep the state database when done"
)
concurrency
=
flag
.
Int
(
"c"
,
10
,
"concurrent workers"
)
depth
=
flag
.
Int
(
"depth"
,
10
,
"maximum link depth"
)
validSchemes
=
flag
.
String
(
"schemes"
,
"http,https"
,
"comma-separated list of allowed protocols"
)
alwaysIn
cludeRelated
=
flag
.
Bool
(
"
in
clude-related"
,
false
,
"
always
include related resources (css, images, etc)"
)
outputFile
=
flag
.
String
(
"output"
,
"crawl.warc.gz"
,
"output WARC file"
)
dbPath
=
flag
.
String
(
"state"
,
"crawldb"
,
"crawl state database path"
)
keepDb
=
flag
.
Bool
(
"keep"
,
false
,
"keep the state database when done"
)
concurrency
=
flag
.
Int
(
"c"
,
10
,
"concurrent workers"
)
depth
=
flag
.
Int
(
"depth"
,
10
0
,
"maximum link depth"
)
validSchemes
=
flag
.
String
(
"schemes"
,
"http,https"
,
"comma-separated list of allowed protocols"
)
ex
cludeRelated
=
flag
.
Bool
(
"
ex
clude-related"
,
false
,
"include related resources (css, images, etc)
only if their URL is in scope
"
)
outputFile
=
flag
.
String
(
"output"
,
"crawl.warc.gz"
,
"output WARC file"
)
cpuprofile
=
flag
.
String
(
"cpuprofile"
,
""
,
"create cpu profile"
)
)
...
...
@@ -213,7 +213,7 @@ func main() {
crawl
.
NewSeedScope
(
seeds
),
crawl
.
NewRegexpIgnoreScope
(
nil
),
)
if
*
alwaysIn
cludeRelated
{
if
!*
ex
cludeRelated
{
scope
=
crawl
.
OR
(
scope
,
crawl
.
NewIncludeRelatedScope
())
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment