crawler
Version, currently 0.3.03 versions
- 0.3.0latestSep 24, 2022
- 0.2.0not indexedSep 24, 2022
- 0.1.1not indexedSep 24, 2022
github.com/maiha/crawler
web crawler
1 stars
0 dependents
License: MIT
Installation
# Add this to your shard.yml
dependencies:
crawler:
github: maiha/crawler
version: ~> 0.3.0Then run:
shards installshard.yml
- Crystal
- no constraint declared
- License
- MIT
- Author
- maiha
- Targets
crawlerfrom src/cli/bin/crawler.crcrawler-devfrom src/cli/bin/crawler.cr
Dependencies
Runtime Dependencies
- pon0.9.1github: maiha/pon.cr
- try0.4.0github: maiha/try.cr
- cmds0.3.4github: maiha/cmds.cr
- curl>= 0.4.5github: maiha/curl.cr
- must*github: maiha/must.cr
- opts*github: maiha/opts.cr
- shard*github: maiha/shard.cr
- shell*github: maiha/shell.cr
- myhtml*github: kostya/myhtml
- pretty1.0.0github: maiha/pretty.cr
- protobuf2.3.0github: maiha/protobuf.cr
- clickhouse*github: maiha/clickhouse.cr
- toml-config*github: maiha/toml-config.cr
- protobuf-storage0.4.0github: maiha/protobuf-storage.cr
README
crawler 
Highly customizable web crawler
- fast : Native code with libcurl
- simple : Just edit config
- flexible : Extract data by CSS and Regex
- safe : Detect infinite loop
- tracable : All HTTP transfered data are stored
Installation
Static Binary is ready for x86_64 linux
- https://github.com/maiha/crawler/releases
Usage
- edit config
- receive html
- extract data
1. edit config
For the first time, config generate may help you.
$ crawler config generate
$ vi .crawlrc
[extract.json]
title = "css:div.r h3"
name = ["css:p.name", "strip:"]
[crawl]
url = "https://www.google.com/search?q=crystal"
next = "css:a.pn"
html = "css:div.rc"
page_max = 2
This means
- Visits initial url
config:crawl.url - Extracts html part
config:crawl.htmland stores in local - Follows next url
config:crawl.nextif page limit doesn't exceedconfig:crawl.page_max
2. receive html
$ crawler recv html
3. extract data
$ crawler extract json
$ crawler pb list json -f val
{"title":"Crystal"}
...
Development
- crystal 0.33.0
for dynamic binary
$ make dynamic
for static binary
needs libcurl.a.
$ make static
Contributing
- Fork it (https://github.com/maiha/crawler/fork)
- Create your feature branch (
git checkout -b my-new-feature) - Commit your changes (
git commit -am 'Add some feature') - Push to the branch (
git push origin my-new-feature) - Create a new Pull Request
Contributors
- maiha - creator and maintainer
Documentation
Built from the current release. The first visit to a release nobody has asked for starts its build.
Links
This release
- Version
0.3.0- Tagged
- Sep 24, 2022
- Commit
67a4cdcf8ee0- Indexed
- yes
Dependents
No indexed shard depends on this one yet.
Repository
github.com/maiha/crawler
Metadata
- Created
- Aug 12, 2026
- Updated
- Aug 15, 2026
- Synced
- Aug 15, 2026
- Versions
- 3