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
03f5e296
Commit
03f5e296
authored
7 years ago
by
ale
Browse files
Options
Downloads
Patches
Plain Diff
Add a README
parent
6f5bef5f
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
README.md
+44
-0
44 additions, 0 deletions
README.md
with
44 additions
and
0 deletions
README.md
0 → 100644
+
44
−
0
View file @
03f5e296
A very simple crawler
=====================
This tool can crawl a bunch of URLs for HTML content, and save the
results in a nice WARC file. It has little control over its traffic,
save for a limit on concurrent outbound requests. Its main purpose is
to quickly and efficiently save websites for archival purposes.
The
*crawl*
tool saves its state in a database, so it can be safely
interrupted and restarted without issues.
# Installation
From this source directory (checked out in the correct place in your
GOPATH), run:
$ go install cmd/crawl
# Usage
Just run
*crawl*
by passing the URLs of the websites you want to crawl
as arguments on the command line:
$ crawl http://example.com/
By default, the tool will store the output WARC file and its own
database in the current directory. This can be controlled with the
*--output*
and
*--state*
command-line options.
The crawling scope is controlled with a set of overlapping checks:
*
URL scheme must be one of
*http*
or
*https*
*
URL must have one of the seeds as a prefix (an eventual
*www.*
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
*--include-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
where it stopped. At the end of a successful crawl, the database will
be removed (unless you specify the
*--keep*
option, for debugging
purposes).
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