stupid_crawler 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/exe/stupid-crawler +2 -2
- data/lib/stupid_crawler/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dc1d9496c979ceffa06114502df520b1d3f96dd1
|
4
|
+
data.tar.gz: 2eda39628cd7b3dc4ea9e43096aa981d9a6b2baf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bac14ea85f620c60a75cb1041515ab56d9a1d739366b46091e4f9f61579ad66d40786e27136c3b48b724f0341cc4a93a30bcd1a20686f322eb0a281509c128a9
|
7
|
+
data.tar.gz: 6b928311c7994dc8d54d04d64c6be6e4765cf34da1e59418afc57a28cf69f4ac59943746c17742121839dc7f0f5bb97fe8c9aaca4179c435e397a2cbc4260dfd
|
data/exe/stupid-crawler
CHANGED
@@ -9,7 +9,7 @@ max_urls = Float::INFINITY
|
|
9
9
|
sleep_time = 0.1
|
10
10
|
robots = false
|
11
11
|
ignore_links = nil
|
12
|
-
dir_path =
|
12
|
+
dir_path = nil
|
13
13
|
|
14
14
|
optparse = OptionParser.new do |parser|
|
15
15
|
parser.on('--site=example.com', String, 'The site to crawl') do |value|
|
@@ -60,5 +60,5 @@ result = StupidCrawler::Crawler.new(
|
|
60
60
|
ignore_links: ignore_links
|
61
61
|
).call
|
62
62
|
|
63
|
-
dir_path = URI.parse(site).host
|
63
|
+
dir_path = URI.parse(site).host if dir_path.nil?
|
64
64
|
StupidCrawler::ResultWriter.call(result, dir_path: dir_path)
|