leggy 0.1.3 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (46) hide show
  1. checksums.yaml +4 -4
  2. data/.travis.yml +7 -0
  3. data/Gemfile +4 -0
  4. data/README.md +195 -2
  5. data/Rakefile +4 -0
  6. data/leggy.gemspec +2 -2
  7. data/lib/leggy.rb +14 -5
  8. data/lib/leggy/app.rb +1 -2
  9. data/lib/leggy/crawl.rb +1 -2
  10. data/lib/leggy/crawl_options.rb +1 -2
  11. data/lib/leggy/error.rb +4 -0
  12. data/lib/leggy/error_handler.rb +30 -0
  13. data/lib/leggy/exceptions.rb +30 -0
  14. data/lib/leggy/mapping/app.rb +1 -6
  15. data/lib/leggy/mapping/crawl.rb +1 -1
  16. data/lib/leggy/mapping/crawl_options.rb +1 -1
  17. data/lib/leggy/mapping/url.rb +1 -1
  18. data/lib/leggy/mapping/user.rb +1 -1
  19. data/lib/leggy/resource/app.rb +3 -6
  20. data/lib/leggy/resource/crawl.rb +9 -12
  21. data/lib/leggy/resource/result.rb +20 -0
  22. data/lib/leggy/resource/url.rb +3 -6
  23. data/lib/leggy/resource/user.rb +1 -4
  24. data/lib/leggy/url.rb +1 -2
  25. data/lib/leggy/user.rb +1 -2
  26. data/lib/leggy/version.rb +1 -1
  27. data/spec/cassettes/{leggy.yml → leggy_app.yml} +106 -822
  28. data/spec/cassettes/leggy_crawl_all.yml +39 -0
  29. data/spec/cassettes/leggy_crawl_cancel.yml +147 -0
  30. data/spec/cassettes/leggy_crawl_start.yml +147 -0
  31. data/spec/cassettes/leggy_crawl_status.yml +183 -0
  32. data/spec/cassettes/leggy_exception.yml +38 -0
  33. data/spec/cassettes/leggy_result.yml +147 -0
  34. data/spec/cassettes/leggy_url.yml +373 -0
  35. data/spec/cassettes/leggy_user.yml +38 -0
  36. data/spec/leggy/exceptions_spec.rb +25 -0
  37. data/spec/leggy/leggy_spec.rb +1 -162
  38. data/spec/leggy/resource/app_spec.rb +64 -0
  39. data/spec/leggy/resource/crawl_spec.rb +88 -0
  40. data/spec/leggy/resource/result_spec.rb +46 -0
  41. data/spec/leggy/resource/url_spec.rb +59 -0
  42. data/spec/leggy/resource/user_spec.rb +22 -0
  43. data/spec/spec_helper.rb +37 -31
  44. data/spec/support/helpers.rb +26 -0
  45. data/spec/support/vcr.rb +12 -0
  46. metadata +48 -11
@@ -6,7 +6,7 @@ module Leggy
6
6
  kartograph do
7
7
  mapping Leggy::Crawl
8
8
 
9
- property *Leggy::Crawl.attr_accessors, scopes: :read
9
+ property *Leggy::Crawl.attr_accessors, scopes: [ :read ]
10
10
  end
11
11
  end
12
12
  end
@@ -6,7 +6,7 @@ module Leggy
6
6
  kartograph do
7
7
  mapping Leggy::CrawlOptions
8
8
 
9
- property *Leggy::CrawlOptions.attr_accessors, scopes: :create
9
+ property *Leggy::CrawlOptions.attr_accessors, scopes: [ :create ]
10
10
  end
11
11
  end
12
12
  end
@@ -6,7 +6,7 @@ module Leggy
6
6
  kartograph do
7
7
  mapping Leggy::Url
8
8
 
9
- property *Leggy::Url.attr_accessors, scopes: :read
9
+ property *Leggy::Url.attr_accessors, scopes: [ :read ]
10
10
  end
11
11
  end
12
12
  end
@@ -6,7 +6,7 @@ module Leggy
6
6
  kartograph do
7
7
  mapping Leggy::User
8
8
 
9
- property *Leggy::User.attr_accessors, scopes: :read
9
+ property *Leggy::User.attr_accessors, scopes: [ :read ]
10
10
  end
11
11
 
12
12
  end
@@ -1,13 +1,10 @@
1
1
  module Leggy
2
2
  module Resource
3
3
  class App < ResourceKit::Resource
4
+ include Leggy::ErrorHandler
4
5
 
5
6
  resources do
6
7
 
7
- default_handler do |response|
8
- raise "ERROR #{response.status}: #{response.body}"
9
- end
10
-
11
8
  # GET https://api_token:@api.80legs.com/v2/apps
12
9
  #
13
10
  action :all do
@@ -23,7 +20,7 @@ module Leggy
23
20
  verb :put
24
21
  path '/v2/apps/:name'
25
22
  body { |object| File.file?(object[:body]) ? File.read(object[:body]) : object[:body] }
26
- handler(204) { |response| true }
23
+ handler(204) { true }
27
24
  end
28
25
 
29
26
  # GET https://api_token:@api.80legs.com/v2/apps/{APP_NAME}
@@ -39,7 +36,7 @@ module Leggy
39
36
  action :delete do
40
37
  verb :delete
41
38
  path '/v2/apps/:name'
42
- handler(204) { |response| true }
39
+ handler(204) { true }
43
40
  end
44
41
 
45
42
  end
@@ -1,11 +1,16 @@
1
1
  module Leggy
2
2
  module Resource
3
3
  class Crawl < ResourceKit::Resource
4
+ include Leggy::ErrorHandler
4
5
 
5
6
  resources do
6
7
 
7
- default_handler do |response|
8
- raise "ERROR #{response.status}: #{response.body}"
8
+ # GET https://api_token:@api.80legs.com/v2/crawls
9
+ #
10
+ action :all do
11
+ verb :get
12
+ path '/v2/crawls'
13
+ handler(200) { |response| Leggy::Mapping::Crawl.extract_collection(response.body, :read) }
9
14
  end
10
15
 
11
16
  # POST https://api_token:@api.80legs.com/v2/crawls/{CRAWL_NAME}
@@ -14,7 +19,7 @@ module Leggy
14
19
  verb :post
15
20
  path '/v2/crawls/:name'
16
21
  body { |object| object.slice(*Leggy::CrawlOptions.attr_accessors).to_json }
17
- handler(204) { |response| true }
22
+ handler(204) { true }
18
23
  end
19
24
 
20
25
  # GET https://api_token:@api.80legs.com/v2/crawls/{CRAWL_NAME}
@@ -30,15 +35,7 @@ module Leggy
30
35
  action :cancel do
31
36
  verb :delete
32
37
  path '/v2/crawls/:name'
33
- handler(204) { |response| true }
34
- end
35
-
36
- # GET https://api_token:@api.80legs.com/v2/results/{CRAWL_NAME}
37
- #
38
- action :results do
39
- verb :get
40
- path '/v2/results/:name'
41
- handler(200) { |response| JSON.parse(response.body) }
38
+ handler(204) { true }
42
39
  end
43
40
 
44
41
  end
@@ -0,0 +1,20 @@
1
+ module Leggy
2
+ module Resource
3
+ class Result < ResourceKit::Resource
4
+ include Leggy::ErrorHandler
5
+
6
+ resources do
7
+
8
+ # GET https://api_token:@api.80legs.com/v2/results/{CRAWL_NAME}
9
+ #
10
+ action :all do
11
+ verb :get
12
+ path '/v2/results/:name'
13
+ handler(200) { |response| JSON.parse(response.body) }
14
+ end
15
+
16
+ end
17
+
18
+ end
19
+ end
20
+ end
@@ -1,13 +1,10 @@
1
1
  module Leggy
2
2
  module Resource
3
3
  class Url < ResourceKit::Resource
4
+ include Leggy::ErrorHandler
4
5
 
5
6
  resources do
6
7
 
7
- default_handler do |response|
8
- raise "ERROR #{response.status}: #{response.body}"
9
- end
10
-
11
8
  # GET https://api_token:@api.80legs.com/v2/urllists
12
9
  #
13
10
  action :all do
@@ -23,7 +20,7 @@ module Leggy
23
20
  verb :put
24
21
  path '/v2/urllists/:name'
25
22
  body { |object| File.file?(object[:body]) ? File.read(object[:body]) : object[:body] }
26
- handler(204) { |response| true }
23
+ handler(204) { true }
27
24
  end
28
25
 
29
26
  # GET https://api_token:@api.80legs.com/v2/urllists/{URLS_NAME}
@@ -39,7 +36,7 @@ module Leggy
39
36
  action :delete do
40
37
  verb :delete
41
38
  path '/v2/urllists/:name'
42
- handler(204) { |response| true }
39
+ handler(204) { true }
43
40
  end
44
41
 
45
42
  end
@@ -1,13 +1,10 @@
1
1
  module Leggy
2
2
  module Resource
3
3
  class User < ResourceKit::Resource
4
+ include Leggy::ErrorHandler
4
5
 
5
6
  resources do
6
7
 
7
- default_handler do |response|
8
- raise "ERROR #{response.status}: #{response.body}"
9
- end
10
-
11
8
  # GET https://api_token:@api.80legs.com/v2/users/{USER_API_TOKEN}
12
9
  #
13
10
  action :find do
@@ -2,12 +2,11 @@ module Leggy
2
2
  class Url
3
3
  include Leggy::Helpers
4
4
 
5
- attr_accessor(
5
+ attr_accessor \
6
6
  :name,
7
7
  :user,
8
8
  :location,
9
9
  :date_created
10
- )
11
10
 
12
11
  end
13
12
  end
@@ -2,7 +2,7 @@ module Leggy
2
2
  class User
3
3
  include Leggy::Helpers
4
4
 
5
- attr_accessor(
5
+ attr_accessor \
6
6
  :token,
7
7
  :organization,
8
8
  :email,
@@ -13,7 +13,6 @@ module Leggy
13
13
  :active,
14
14
  :urls_crawled,
15
15
  :date_registered
16
- )
17
16
 
18
17
  end
19
18
  end
@@ -1,3 +1,3 @@
1
1
  module Leggy
2
- VERSION = "0.1.3"
2
+ VERSION = "0.2.0"
3
3
  end
@@ -1,128 +1,5 @@
1
1
  ---
2
2
  http_interactions:
3
- - request:
4
- method: put
5
- uri: https://<TOKEN>:@api.80legs.com/v2/apps/sample
6
- body:
7
- encoding: UTF-8
8
- string: |
9
- // This 80app returns the header data from each URL crawled
10
-
11
- var EightyApp = function() {
12
- this.processDocument = function(html, url, headers, status, jQuery) {
13
- var app = this;
14
- var $ = jQuery;
15
- var $html = app.parseHtml(html, $);
16
- var object = {};
17
-
18
- if(typeof headers == 'string' || headers instanceof String) {
19
- var headersArray = headers.split("\r\n");
20
- for (var i = 0; i < headersArray.length; i++) {
21
- var keyvalArray = headersArray[i].split(": ");
22
- var key = keyvalArray[0];
23
- var value = keyvalArray[1];
24
- object[key] = value;
25
- }
26
-
27
- return JSON.stringify(object);
28
- }
29
-
30
- return JSON.stringify(headers);
31
- }
32
-
33
- this.parseLinks = function(html, url, headers, status, jQuery) {
34
- var app = this;
35
- var $ = jQuery;
36
- var $html = app.parseHtml(html, $);
37
- var links = [];
38
-
39
- // gets all links in the html document
40
- $html.find('a').each(function(i, obj) {
41
- var link = app.makeLink(url, $(this).attr('href'));
42
- if(link != null) {
43
- links.push(link);
44
- }
45
- });
46
-
47
- return links;
48
- }
49
- }
50
-
51
- try {
52
- // Testing
53
- module.exports = function(EightyAppBase) {
54
- EightyApp.prototype = new EightyAppBase();
55
- return new EightyApp();
56
- }
57
- } catch(e) {
58
- // Production
59
- console.log("Eighty app exists.");
60
- EightyApp.prototype = new EightyAppBase();
61
- }
62
- headers:
63
- Content-Type:
64
- - application/octet-stream
65
- User-Agent:
66
- - Faraday v0.9.0
67
- Accept-Encoding:
68
- - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
69
- Accept:
70
- - "*/*"
71
- response:
72
- status:
73
- code: 204
74
- message: No Content
75
- headers:
76
- Content-Length:
77
- - '0'
78
- Content-Type:
79
- - application/octet-stream
80
- Date:
81
- - Tue, 14 Oct 2014 21:37:52 GMT
82
- Server:
83
- - Cowboy
84
- Connection:
85
- - keep-alive
86
- body:
87
- encoding: UTF-8
88
- string: ''
89
- http_version:
90
- recorded_at: Tue, 14 Oct 2014 21:37:54 GMT
91
- - request:
92
- method: delete
93
- uri: https://<TOKEN>:@api.80legs.com/v2/apps/sample
94
- body:
95
- encoding: US-ASCII
96
- string: ''
97
- headers:
98
- Content-Type:
99
- - application/json
100
- User-Agent:
101
- - Faraday v0.9.0
102
- Accept-Encoding:
103
- - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
104
- Accept:
105
- - "*/*"
106
- response:
107
- status:
108
- code: 204
109
- message: No Content
110
- headers:
111
- Content-Length:
112
- - '0'
113
- Content-Type:
114
- - application/octet-stream
115
- Date:
116
- - Tue, 14 Oct 2014 21:37:52 GMT
117
- Server:
118
- - Cowboy
119
- Connection:
120
- - keep-alive
121
- body:
122
- encoding: UTF-8
123
- string: ''
124
- http_version:
125
- recorded_at: Tue, 14 Oct 2014 21:37:55 GMT
126
3
  - request:
127
4
  method: put
128
5
  uri: https://<TOKEN>:@api.80legs.com/v2/apps/sample_all
@@ -186,7 +63,7 @@ http_interactions:
186
63
  Content-Type:
187
64
  - application/octet-stream
188
65
  User-Agent:
189
- - Faraday v0.9.0
66
+ - Faraday v0.9.2
190
67
  Accept-Encoding:
191
68
  - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
192
69
  Accept:
@@ -201,7 +78,7 @@ http_interactions:
201
78
  Content-Type:
202
79
  - application/octet-stream
203
80
  Date:
204
- - Tue, 14 Oct 2014 21:37:53 GMT
81
+ - Sat, 12 Dec 2015 06:03:54 GMT
205
82
  Server:
206
83
  - Cowboy
207
84
  Connection:
@@ -210,7 +87,7 @@ http_interactions:
210
87
  encoding: UTF-8
211
88
  string: ''
212
89
  http_version:
213
- recorded_at: Tue, 14 Oct 2014 21:37:55 GMT
90
+ recorded_at: Sat, 12 Dec 2015 06:03:58 GMT
214
91
  - request:
215
92
  method: get
216
93
  uri: https://<TOKEN>:@api.80legs.com/v2/apps
@@ -221,7 +98,7 @@ http_interactions:
221
98
  Content-Type:
222
99
  - application/json
223
100
  User-Agent:
224
- - Faraday v0.9.0
101
+ - Faraday v0.9.2
225
102
  Accept-Encoding:
226
103
  - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
227
104
  Accept:
@@ -234,11 +111,11 @@ http_interactions:
234
111
  Content-Type:
235
112
  - application/json
236
113
  Date:
237
- - Tue, 14 Oct 2014 21:37:53 GMT
114
+ - Sat, 12 Dec 2015 06:03:55 GMT
238
115
  Server:
239
116
  - Cowboy
240
117
  Content-Length:
241
- - '4636'
118
+ - '5542'
242
119
  Connection:
243
120
  - keep-alive
244
121
  body:
@@ -251,23 +128,28 @@ http_interactions:
251
128
  the following attributes from each URL crawled: title, meta tags, links (everything
252
129
  in an ''a'' tag)","user":"bjadslid9v7uat88n70xjz0omeyun69j","date_created":"2014-7-17"},{"location":"80apps/bjadslid9v7uat88n70xjz0omeyun69j/LinkTracer.js","name":"LinkTracer.js","description":"Returns
253
130
  a timestamp for when the URL was crawled, the original URL that led to this
254
- URL being crawled, and the HTML.","user":"bjadslid9v7uat88n70xjz0omeyun69j","date_created":"2014-8-25"},{"location":"80apps/bjadslid9v7uat88n70xjz0omeyun69j/LinksAndKeywords.js","name":"LinksAndKeywords.js","description":"Returns
255
- all links and keywords, with their counts, found on a page","user":"bjadslid9v7uat88n70xjz0omeyun69j","date_created":"2014-8-26"},{"location":"80apps/bjadslid9v7uat88n70xjz0omeyun69j/LinkCollector.js","name":"LinkCollector.js","description":"Returns
256
- all links found on a page","user":"bjadslid9v7uat88n70xjz0omeyun69j","date_created":"2014-7-17"},{"location":"80apps/bjadslid9v7uat88n70xjz0omeyun69j/KeywordCount.js","name":"KeywordCount.js","description":"Returns
257
- a timestamp for when the URL was crawled, and a list of words on the page
258
- with their frequencies.","user":"bjadslid9v7uat88n70xjz0omeyun69j","date_created":"2014-7-17"},{"location":"80apps/bjadslid9v7uat88n70xjz0omeyun69j/HeaderData.js","name":"HeaderData.js","description":"Returns
131
+ URL being crawled, and the HTML.","user":"bjadslid9v7uat88n70xjz0omeyun69j","date_created":"2014-8-25"},{"location":"80apps/bjadslid9v7uat88n70xjz0omeyun69j/LinksAndKeywords.js","name":"LinksAndKeywords.js","description":"Custom
132
+ 80App","user":"bjadslid9v7uat88n70xjz0omeyun69j","date_created":"2015-7-9"},{"location":"80apps/bjadslid9v7uat88n70xjz0omeyun69j/LinkCollector.js","name":"LinkCollector.js","description":"Returns
133
+ all links found on a page, along with their anchor text.","user":"bjadslid9v7uat88n70xjz0omeyun69j","date_created":"2015-2-5"},{"location":"80apps/bjadslid9v7uat88n70xjz0omeyun69j/KeywordCount.js","name":"KeywordCount.js","description":"Custom
134
+ 80App","user":"bjadslid9v7uat88n70xjz0omeyun69j","date_created":"2015-7-9"},{"location":"80apps/bjadslid9v7uat88n70xjz0omeyun69j/HeaderData.js","name":"HeaderData.js","description":"Returns
259
135
  the header data from each URL crawled","user":"bjadslid9v7uat88n70xjz0omeyun69j","date_created":"2014-9-8"},{"location":"80apps/bjadslid9v7uat88n70xjz0omeyun69j/FullPageContent.js","name":"FullPageContent.js","description":"Returns
260
136
  full HTML source of each URL crawled.","user":"bjadslid9v7uat88n70xjz0omeyun69j","date_created":"2014-7-17"},{"location":"80apps/bjadslid9v7uat88n70xjz0omeyun69j/FileFinder.js","name":"FileFinder.js","description":"Returns
261
137
  all links to files (e.g., .docx, .pptx, .pdf, etc.) found on a page","user":"bjadslid9v7uat88n70xjz0omeyun69j","date_created":"2014-7-17"},{"location":"80apps/bjadslid9v7uat88n70xjz0omeyun69j/ExternalLinkCollector.js","name":"ExternalLinkCollector.js","description":"Returns
262
138
  all links found on a page","user":"bjadslid9v7uat88n70xjz0omeyun69j","date_created":"2014-7-17"},{"location":"80apps/bjadslid9v7uat88n70xjz0omeyun69j/EmailsAndPageContent.js","name":"EmailsAndPageContent.js","description":"Returns
263
139
  a list of email and full page content","user":"bjadslid9v7uat88n70xjz0omeyun69j","date_created":"2014-7-17"},{"location":"80apps/bjadslid9v7uat88n70xjz0omeyun69j/EmailCollector.js","name":"EmailCollector.js","description":"Returns
264
- a list of emails for every page on the domains of the URL list","user":"bjadslid9v7uat88n70xjz0omeyun69j","date_created":"2014-7-17"},{"location":"80apps/bjadslid9v7uat88n70xjz0omeyun69j/DocumentData.js","name":"DocumentData.js","description":"Returns
140
+ a list of emails for every page on the domains of the URL list","user":"bjadslid9v7uat88n70xjz0omeyun69j","date_created":"2014-7-17"},{"location":"80apps/bjadslid9v7uat88n70xjz0omeyun69j/DomainCollector.js","name":"DomainCollector.js","description":"This
141
+ 80app will only crawl to links on the current domain, returning the count
142
+ of every domain linked from each URL crawled.","user":"bjadslid9v7uat88n70xjz0omeyun69j","date_created":"2014-10-28"},{"location":"80apps/bjadslid9v7uat88n70xjz0omeyun69j/DocumentData.js","name":"DocumentData.js","description":"Returns
265
143
  title, meta tags, and links attributes from each URL crawled","user":"bjadslid9v7uat88n70xjz0omeyun69j","date_created":"2014-7-17"},{"location":"80apps/bjadslid9v7uat88n70xjz0omeyun69j/CrawlInternalLinks.js","name":"CrawlInternalLinks.js","description":"Returns
266
144
  URLs that have the same domain as the current URL being crawled.","user":"bjadslid9v7uat88n70xjz0omeyun69j","date_created":"2014-7-17"},{"location":"80apps/bjadslid9v7uat88n70xjz0omeyun69j/CrawlImages.js","name":"CrawlImages.js","description":"Returns
267
- all URLs to and base64-encoded versions of all images found on each URL crawled","user":"bjadslid9v7uat88n70xjz0omeyun69j","date_created":"2014-7-17"},{"location":"80apps/<TOKEN>/sample_all","name":"sample_all","description":"Custom
268
- 80App","user":"<TOKEN>","date_created":"2014-10-14"}]'
145
+ all URLs to and base64-encoded versions of all images found on each URL crawled","user":"bjadslid9v7uat88n70xjz0omeyun69j","date_created":"2014-7-17"},{"location":"80apps/bjadslid9v7uat88n70xjz0omeyun69j/CheckStatusOnExternalDomain.js","name":"CheckStatusOnExternalDomain.js","description":"Keeps
146
+ crawling until it hits an external domain and then stops. Returns status code
147
+ for every URL crawled.","user":"bjadslid9v7uat88n70xjz0omeyun69j","date_created":"2015-3-10"},{"location":"80apps/<TOKEN>/sample_all","name":"sample_all","description":"Custom
148
+ 80App","user":"<TOKEN>","date_created":"2015-12-12"},{"location":"80apps/<TOKEN>/CrawlerWithoutHTML","name":"CrawlerWithoutHTML","description":"Custom
149
+ 80App","user":"<TOKEN>","date_created":"2015-1-26"},{"location":"80apps/<TOKEN>/CrawlerWithHTML","name":"CrawlerWithHTML","description":"Custom
150
+ 80App","user":"<TOKEN>","date_created":"2015-1-20"}]'
269
151
  http_version:
270
- recorded_at: Tue, 14 Oct 2014 21:37:55 GMT
152
+ recorded_at: Sat, 12 Dec 2015 06:03:59 GMT
271
153
  - request:
272
154
  method: delete
273
155
  uri: https://<TOKEN>:@api.80legs.com/v2/apps/sample_all
@@ -278,7 +160,7 @@ http_interactions:
278
160
  Content-Type:
279
161
  - application/json
280
162
  User-Agent:
281
- - Faraday v0.9.0
163
+ - Faraday v0.9.2
282
164
  Accept-Encoding:
283
165
  - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
284
166
  Accept:
@@ -293,7 +175,7 @@ http_interactions:
293
175
  Content-Type:
294
176
  - application/octet-stream
295
177
  Date:
296
- - Tue, 14 Oct 2014 21:37:53 GMT
178
+ - Sat, 12 Dec 2015 06:03:55 GMT
297
179
  Server:
298
180
  - Cowboy
299
181
  Connection:
@@ -302,10 +184,10 @@ http_interactions:
302
184
  encoding: UTF-8
303
185
  string: ''
304
186
  http_version:
305
- recorded_at: Tue, 14 Oct 2014 21:37:55 GMT
187
+ recorded_at: Sat, 12 Dec 2015 06:03:59 GMT
306
188
  - request:
307
189
  method: put
308
- uri: https://<TOKEN>:@api.80legs.com/v2/apps/sample_delete
190
+ uri: https://<TOKEN>:@api.80legs.com/v2/apps/sample
309
191
  body:
310
192
  encoding: UTF-8
311
193
  string: |
@@ -366,7 +248,7 @@ http_interactions:
366
248
  Content-Type:
367
249
  - application/octet-stream
368
250
  User-Agent:
369
- - Faraday v0.9.0
251
+ - Faraday v0.9.2
370
252
  Accept-Encoding:
371
253
  - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
372
254
  Accept:
@@ -381,7 +263,7 @@ http_interactions:
381
263
  Content-Type:
382
264
  - application/octet-stream
383
265
  Date:
384
- - Tue, 14 Oct 2014 21:37:53 GMT
266
+ - Sat, 12 Dec 2015 06:03:55 GMT
385
267
  Server:
386
268
  - Cowboy
387
269
  Connection:
@@ -390,10 +272,10 @@ http_interactions:
390
272
  encoding: UTF-8
391
273
  string: ''
392
274
  http_version:
393
- recorded_at: Tue, 14 Oct 2014 21:37:55 GMT
275
+ recorded_at: Sat, 12 Dec 2015 06:04:00 GMT
394
276
  - request:
395
277
  method: delete
396
- uri: https://<TOKEN>:@api.80legs.com/v2/apps/sample_delete
278
+ uri: https://<TOKEN>:@api.80legs.com/v2/apps/sample
397
279
  body:
398
280
  encoding: US-ASCII
399
281
  string: ''
@@ -401,7 +283,7 @@ http_interactions:
401
283
  Content-Type:
402
284
  - application/json
403
285
  User-Agent:
404
- - Faraday v0.9.0
286
+ - Faraday v0.9.2
405
287
  Accept-Encoding:
406
288
  - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
407
289
  Accept:
@@ -416,7 +298,7 @@ http_interactions:
416
298
  Content-Type:
417
299
  - application/octet-stream
418
300
  Date:
419
- - Tue, 14 Oct 2014 21:37:53 GMT
301
+ - Sat, 12 Dec 2015 06:03:56 GMT
420
302
  Server:
421
303
  - Cowboy
422
304
  Connection:
@@ -425,7 +307,7 @@ http_interactions:
425
307
  encoding: UTF-8
426
308
  string: ''
427
309
  http_version:
428
- recorded_at: Tue, 14 Oct 2014 21:37:56 GMT
310
+ recorded_at: Sat, 12 Dec 2015 06:04:01 GMT
429
311
  - request:
430
312
  method: put
431
313
  uri: https://<TOKEN>:@api.80legs.com/v2/apps/sample_find
@@ -489,7 +371,7 @@ http_interactions:
489
371
  Content-Type:
490
372
  - application/octet-stream
491
373
  User-Agent:
492
- - Faraday v0.9.0
374
+ - Faraday v0.9.2
493
375
  Accept-Encoding:
494
376
  - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
495
377
  Accept:
@@ -504,7 +386,7 @@ http_interactions:
504
386
  Content-Type:
505
387
  - application/octet-stream
506
388
  Date:
507
- - Tue, 14 Oct 2014 21:37:54 GMT
389
+ - Sat, 12 Dec 2015 06:03:57 GMT
508
390
  Server:
509
391
  - Cowboy
510
392
  Connection:
@@ -513,7 +395,7 @@ http_interactions:
513
395
  encoding: UTF-8
514
396
  string: ''
515
397
  http_version:
516
- recorded_at: Tue, 14 Oct 2014 21:37:56 GMT
398
+ recorded_at: Sat, 12 Dec 2015 06:04:01 GMT
517
399
  - request:
518
400
  method: get
519
401
  uri: https://<TOKEN>:@api.80legs.com/v2/apps/sample_find
@@ -524,7 +406,7 @@ http_interactions:
524
406
  Content-Type:
525
407
  - application/json
526
408
  User-Agent:
527
- - Faraday v0.9.0
409
+ - Faraday v0.9.2
528
410
  Accept-Encoding:
529
411
  - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
530
412
  Accept:
@@ -537,7 +419,7 @@ http_interactions:
537
419
  Content-Type:
538
420
  - application/octet-stream
539
421
  Date:
540
- - Tue, 14 Oct 2014 21:37:54 GMT
422
+ - Sat, 12 Dec 2015 06:03:57 GMT
541
423
  Server:
542
424
  - Cowboy
543
425
  Content-Length:
@@ -601,7 +483,7 @@ http_interactions:
601
483
  EightyApp.prototype = new EightyAppBase();
602
484
  }
603
485
  http_version:
604
- recorded_at: Tue, 14 Oct 2014 21:37:56 GMT
486
+ recorded_at: Sat, 12 Dec 2015 06:04:02 GMT
605
487
  - request:
606
488
  method: delete
607
489
  uri: https://<TOKEN>:@api.80legs.com/v2/apps/sample_find
@@ -612,7 +494,7 @@ http_interactions:
612
494
  Content-Type:
613
495
  - application/json
614
496
  User-Agent:
615
- - Faraday v0.9.0
497
+ - Faraday v0.9.2
616
498
  Accept-Encoding:
617
499
  - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
618
500
  Accept:
@@ -627,7 +509,7 @@ http_interactions:
627
509
  Content-Type:
628
510
  - application/octet-stream
629
511
  Date:
630
- - Tue, 14 Oct 2014 21:37:54 GMT
512
+ - Sat, 12 Dec 2015 06:03:58 GMT
631
513
  Server:
632
514
  - Cowboy
633
515
  Connection:
@@ -636,53 +518,71 @@ http_interactions:
636
518
  encoding: UTF-8
637
519
  string: ''
638
520
  http_version:
639
- recorded_at: Tue, 14 Oct 2014 21:37:56 GMT
640
- - request:
641
- method: get
642
- uri: https://<TOKEN>:@api.80legs.com/v2/users/<TOKEN>
643
- body:
644
- encoding: US-ASCII
645
- string: ''
646
- headers:
647
- Content-Type:
648
- - application/json
649
- User-Agent:
650
- - Faraday v0.9.0
651
- Accept-Encoding:
652
- - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
653
- Accept:
654
- - "*/*"
655
- response:
656
- status:
657
- code: 200
658
- message: OK
659
- headers:
660
- Content-Type:
661
- - application/json
662
- Date:
663
- - Tue, 14 Oct 2014 21:37:54 GMT
664
- Server:
665
- - Cowboy
666
- Content-Length:
667
- - '294'
668
- Connection:
669
- - keep-alive
670
- body:
671
- encoding: UTF-8
672
- string: '{"token":"<TOKEN>","organization":"Civvic","email":"mattsolt@gmail.com","first_name":"Matt","last_name":"Solt","phone_number":"undefined","stripe_customer_id":"cus_4lcSWy6GfXcdmE","plan_id":"plus","type":"user","active":1,"urls_crawled":0,"date_registered":"2014-4-22"}'
673
- http_version:
674
- recorded_at: Tue, 14 Oct 2014 21:37:56 GMT
521
+ recorded_at: Sat, 12 Dec 2015 06:04:02 GMT
675
522
  - request:
676
- method: post
677
- uri: https://<TOKEN>:@api.80legs.com/v2/crawls/status_crawl
523
+ method: put
524
+ uri: https://<TOKEN>:@api.80legs.com/v2/apps/sample_delete
678
525
  body:
679
526
  encoding: UTF-8
680
- string: '{"app":"HeaderData.js","urllist":"1","max_depth":2,"max_urls":1000}'
527
+ string: |
528
+ // This 80app returns the header data from each URL crawled
529
+
530
+ var EightyApp = function() {
531
+ this.processDocument = function(html, url, headers, status, jQuery) {
532
+ var app = this;
533
+ var $ = jQuery;
534
+ var $html = app.parseHtml(html, $);
535
+ var object = {};
536
+
537
+ if(typeof headers == 'string' || headers instanceof String) {
538
+ var headersArray = headers.split("\r\n");
539
+ for (var i = 0; i < headersArray.length; i++) {
540
+ var keyvalArray = headersArray[i].split(": ");
541
+ var key = keyvalArray[0];
542
+ var value = keyvalArray[1];
543
+ object[key] = value;
544
+ }
545
+
546
+ return JSON.stringify(object);
547
+ }
548
+
549
+ return JSON.stringify(headers);
550
+ }
551
+
552
+ this.parseLinks = function(html, url, headers, status, jQuery) {
553
+ var app = this;
554
+ var $ = jQuery;
555
+ var $html = app.parseHtml(html, $);
556
+ var links = [];
557
+
558
+ // gets all links in the html document
559
+ $html.find('a').each(function(i, obj) {
560
+ var link = app.makeLink(url, $(this).attr('href'));
561
+ if(link != null) {
562
+ links.push(link);
563
+ }
564
+ });
565
+
566
+ return links;
567
+ }
568
+ }
569
+
570
+ try {
571
+ // Testing
572
+ module.exports = function(EightyAppBase) {
573
+ EightyApp.prototype = new EightyAppBase();
574
+ return new EightyApp();
575
+ }
576
+ } catch(e) {
577
+ // Production
578
+ console.log("Eighty app exists.");
579
+ EightyApp.prototype = new EightyAppBase();
580
+ }
681
581
  headers:
682
582
  Content-Type:
683
- - application/json
583
+ - application/octet-stream
684
584
  User-Agent:
685
- - Faraday v0.9.0
585
+ - Faraday v0.9.2
686
586
  Accept-Encoding:
687
587
  - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
688
588
  Accept:
@@ -695,9 +595,9 @@ http_interactions:
695
595
  Content-Length:
696
596
  - '0'
697
597
  Content-Type:
698
- - application/json
598
+ - application/octet-stream
699
599
  Date:
700
- - Tue, 14 Oct 2014 21:37:54 GMT
600
+ - Sat, 12 Dec 2015 06:03:59 GMT
701
601
  Server:
702
602
  - Cowboy
703
603
  Connection:
@@ -706,46 +606,10 @@ http_interactions:
706
606
  encoding: UTF-8
707
607
  string: ''
708
608
  http_version:
709
- recorded_at: Tue, 14 Oct 2014 21:37:57 GMT
710
- - request:
711
- method: get
712
- uri: https://<TOKEN>:@api.80legs.com/v2/crawls/status_crawl
713
- body:
714
- encoding: US-ASCII
715
- string: ''
716
- headers:
717
- Content-Type:
718
- - application/json
719
- User-Agent:
720
- - Faraday v0.9.0
721
- Accept-Encoding:
722
- - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
723
- Accept:
724
- - "*/*"
725
- response:
726
- status:
727
- code: 200
728
- message: OK
729
- headers:
730
- Content-Type:
731
- - application/json
732
- Date:
733
- - Tue, 14 Oct 2014 21:37:55 GMT
734
- Server:
735
- - Cowboy
736
- Content-Length:
737
- - '277'
738
- Connection:
739
- - keep-alive
740
- body:
741
- encoding: UTF-8
742
- string: '{"id":57303,"name":"status_crawl","user":"<TOKEN>","user_agent":"voltron","app":"HeaderData.js","urllist":"1","data":"","max_depth":2,"max_urls":1000,"status":"QUEUED","depth":0,"urls_crawled":0,"date_created":"2014-10-14
743
- 21:37:55","date_completed":""}'
744
- http_version:
745
- recorded_at: Tue, 14 Oct 2014 21:37:57 GMT
609
+ recorded_at: Sat, 12 Dec 2015 06:04:03 GMT
746
610
  - request:
747
611
  method: delete
748
- uri: https://<TOKEN>:@api.80legs.com/v2/crawls/status_crawl
612
+ uri: https://<TOKEN>:@api.80legs.com/v2/apps/sample_delete
749
613
  body:
750
614
  encoding: US-ASCII
751
615
  string: ''
@@ -753,7 +617,7 @@ http_interactions:
753
617
  Content-Type:
754
618
  - application/json
755
619
  User-Agent:
756
- - Faraday v0.9.0
620
+ - Faraday v0.9.2
757
621
  Accept-Encoding:
758
622
  - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
759
623
  Accept:
@@ -765,590 +629,10 @@ http_interactions:
765
629
  headers:
766
630
  Content-Length:
767
631
  - '0'
768
- Content-Type:
769
- - application/json
770
- Date:
771
- - Tue, 14 Oct 2014 21:37:55 GMT
772
- Server:
773
- - Cowboy
774
- Connection:
775
- - keep-alive
776
- body:
777
- encoding: UTF-8
778
- string: ''
779
- http_version:
780
- recorded_at: Tue, 14 Oct 2014 21:37:57 GMT
781
- - request:
782
- method: post
783
- uri: https://<TOKEN>:@api.80legs.com/v2/crawls/test_crawl
784
- body:
785
- encoding: UTF-8
786
- string: '{"app":"HeaderData.js","urllist":"1","max_depth":2,"max_urls":1000}'
787
- headers:
788
- Content-Type:
789
- - application/json
790
- User-Agent:
791
- - Faraday v0.9.0
792
- Accept-Encoding:
793
- - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
794
- Accept:
795
- - "*/*"
796
- response:
797
- status:
798
- code: 422
799
- message: Unprocessable Entity
800
- headers:
801
- Content-Type:
802
- - application/json
803
- Date:
804
- - Tue, 14 Oct 2014 21:37:55 GMT
805
- Server:
806
- - Cowboy
807
- Content-Length:
808
- - '0'
809
- Connection:
810
- - keep-alive
811
- body:
812
- encoding: UTF-8
813
- string: ''
814
- http_version:
815
- recorded_at: Tue, 14 Oct 2014 21:37:57 GMT
816
- - request:
817
- method: delete
818
- uri: https://<TOKEN>:@api.80legs.com/v2/crawls/test_crawl
819
- body:
820
- encoding: US-ASCII
821
- string: ''
822
- headers:
823
- Content-Type:
824
- - application/json
825
- User-Agent:
826
- - Faraday v0.9.0
827
- Accept-Encoding:
828
- - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
829
- Accept:
830
- - "*/*"
831
- response:
832
- status:
833
- code: 500
834
- message: Internal Server Error
835
- headers:
836
- Content-Type:
837
- - application/json
838
- Date:
839
- - Tue, 14 Oct 2014 21:37:55 GMT
840
- Server:
841
- - Cowboy
842
- Content-Length:
843
- - '43'
844
- Connection:
845
- - keep-alive
846
- body:
847
- encoding: UTF-8
848
- string: '{"error":"crawl has already been canceled"}'
849
- http_version:
850
- recorded_at: Tue, 14 Oct 2014 21:37:57 GMT
851
- - request:
852
- method: put
853
- uri: https://<TOKEN>:@api.80legs.com/v2/urllists/sample
854
- body:
855
- encoding: UTF-8
856
- string: |
857
- [
858
- "http://example.com",
859
- "https://example.org"
860
- ]
861
- headers:
862
- Content-Type:
863
- - application/octet-stream
864
- User-Agent:
865
- - Faraday v0.9.0
866
- Accept-Encoding:
867
- - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
868
- Accept:
869
- - "*/*"
870
- response:
871
- status:
872
- code: 204
873
- message: No Content
874
- headers:
875
- Content-Length:
876
- - '0'
877
- Content-Type:
878
- - application/octet-stream
879
- Date:
880
- - Tue, 14 Oct 2014 21:37:55 GMT
881
- Server:
882
- - Cowboy
883
- Connection:
884
- - keep-alive
885
- body:
886
- encoding: UTF-8
887
- string: ''
888
- http_version:
889
- recorded_at: Tue, 14 Oct 2014 21:37:58 GMT
890
- - request:
891
- method: delete
892
- uri: https://<TOKEN>:@api.80legs.com/v2/urllists/sample
893
- body:
894
- encoding: US-ASCII
895
- string: ''
896
- headers:
897
- Content-Type:
898
- - application/json
899
- User-Agent:
900
- - Faraday v0.9.0
901
- Accept-Encoding:
902
- - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
903
- Accept:
904
- - "*/*"
905
- response:
906
- status:
907
- code: 204
908
- message: No Content
909
- headers:
910
- Content-Length:
911
- - '0'
912
- Content-Type:
913
- - application/octet-stream
914
- Date:
915
- - Tue, 14 Oct 2014 21:37:56 GMT
916
- Server:
917
- - Cowboy
918
- Connection:
919
- - keep-alive
920
- body:
921
- encoding: UTF-8
922
- string: ''
923
- http_version:
924
- recorded_at: Tue, 14 Oct 2014 21:37:58 GMT
925
- - request:
926
- method: put
927
- uri: https://<TOKEN>:@api.80legs.com/v2/urllists/sample_all
928
- body:
929
- encoding: UTF-8
930
- string: |
931
- [
932
- "http://example.com",
933
- "https://example.org"
934
- ]
935
- headers:
936
632
  Content-Type:
937
633
  - application/octet-stream
938
- User-Agent:
939
- - Faraday v0.9.0
940
- Accept-Encoding:
941
- - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
942
- Accept:
943
- - "*/*"
944
- response:
945
- status:
946
- code: 204
947
- message: No Content
948
- headers:
949
- Content-Length:
950
- - '0'
951
- Content-Type:
952
- - application/octet-stream
953
- Date:
954
- - Tue, 14 Oct 2014 21:37:56 GMT
955
- Server:
956
- - Cowboy
957
- Connection:
958
- - keep-alive
959
- body:
960
- encoding: UTF-8
961
- string: ''
962
- http_version:
963
- recorded_at: Tue, 14 Oct 2014 21:37:58 GMT
964
- - request:
965
- method: get
966
- uri: https://<TOKEN>:@api.80legs.com/v2/urllists
967
- body:
968
- encoding: US-ASCII
969
- string: ''
970
- headers:
971
- Content-Type:
972
- - application/json
973
- User-Agent:
974
- - Faraday v0.9.0
975
- Accept-Encoding:
976
- - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
977
- Accept:
978
- - "*/*"
979
- response:
980
- status:
981
- code: 200
982
- message: OK
983
- headers:
984
- Content-Type:
985
- - application/json
986
- Date:
987
- - Tue, 14 Oct 2014 21:37:56 GMT
988
- Server:
989
- - Cowboy
990
- Content-Length:
991
- - '299'
992
- Connection:
993
- - keep-alive
994
- body:
995
- encoding: UTF-8
996
- string: '[{"location":"urllists/<TOKEN>/sample_all","name":"sample_all","user":"<TOKEN>","date_created":"2014-10-14"},{"location":"urllists/<TOKEN>/1","name":"1","user":"<TOKEN>","date_created":"2014-10-12"}]'
997
- http_version:
998
- recorded_at: Tue, 14 Oct 2014 21:37:58 GMT
999
- - request:
1000
- method: delete
1001
- uri: https://<TOKEN>:@api.80legs.com/v2/urllists/sample_all
1002
- body:
1003
- encoding: US-ASCII
1004
- string: ''
1005
- headers:
1006
- Content-Type:
1007
- - application/json
1008
- User-Agent:
1009
- - Faraday v0.9.0
1010
- Accept-Encoding:
1011
- - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
1012
- Accept:
1013
- - "*/*"
1014
- response:
1015
- status:
1016
- code: 204
1017
- message: No Content
1018
- headers:
1019
- Content-Length:
1020
- - '0'
1021
- Content-Type:
1022
- - application/octet-stream
1023
- Date:
1024
- - Tue, 14 Oct 2014 21:37:56 GMT
1025
- Server:
1026
- - Cowboy
1027
- Connection:
1028
- - keep-alive
1029
- body:
1030
- encoding: UTF-8
1031
- string: ''
1032
- http_version:
1033
- recorded_at: Tue, 14 Oct 2014 21:37:58 GMT
1034
- - request:
1035
- method: put
1036
- uri: https://<TOKEN>:@api.80legs.com/v2/urllists/sample_delete
1037
- body:
1038
- encoding: UTF-8
1039
- string: |
1040
- [
1041
- "http://example.com",
1042
- "https://example.org"
1043
- ]
1044
- headers:
1045
- Content-Type:
1046
- - application/octet-stream
1047
- User-Agent:
1048
- - Faraday v0.9.0
1049
- Accept-Encoding:
1050
- - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
1051
- Accept:
1052
- - "*/*"
1053
- response:
1054
- status:
1055
- code: 204
1056
- message: No Content
1057
- headers:
1058
- Content-Length:
1059
- - '0'
1060
- Content-Type:
1061
- - application/octet-stream
1062
- Date:
1063
- - Tue, 14 Oct 2014 21:37:56 GMT
1064
- Server:
1065
- - Cowboy
1066
- Connection:
1067
- - keep-alive
1068
- body:
1069
- encoding: UTF-8
1070
- string: ''
1071
- http_version:
1072
- recorded_at: Tue, 14 Oct 2014 21:37:59 GMT
1073
- - request:
1074
- method: delete
1075
- uri: https://<TOKEN>:@api.80legs.com/v2/urllists/sample_delete
1076
- body:
1077
- encoding: US-ASCII
1078
- string: ''
1079
- headers:
1080
- Content-Type:
1081
- - application/json
1082
- User-Agent:
1083
- - Faraday v0.9.0
1084
- Accept-Encoding:
1085
- - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
1086
- Accept:
1087
- - "*/*"
1088
- response:
1089
- status:
1090
- code: 204
1091
- message: No Content
1092
- headers:
1093
- Content-Length:
1094
- - '0'
1095
- Content-Type:
1096
- - application/octet-stream
1097
- Date:
1098
- - Tue, 14 Oct 2014 21:37:57 GMT
1099
- Server:
1100
- - Cowboy
1101
- Connection:
1102
- - keep-alive
1103
- body:
1104
- encoding: UTF-8
1105
- string: ''
1106
- http_version:
1107
- recorded_at: Tue, 14 Oct 2014 21:37:59 GMT
1108
- - request:
1109
- method: put
1110
- uri: https://<TOKEN>:@api.80legs.com/v2/urllists/sample_find
1111
- body:
1112
- encoding: UTF-8
1113
- string: |
1114
- [
1115
- "http://example.com",
1116
- "https://example.org"
1117
- ]
1118
- headers:
1119
- Content-Type:
1120
- - application/octet-stream
1121
- User-Agent:
1122
- - Faraday v0.9.0
1123
- Accept-Encoding:
1124
- - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
1125
- Accept:
1126
- - "*/*"
1127
- response:
1128
- status:
1129
- code: 204
1130
- message: No Content
1131
- headers:
1132
- Content-Length:
1133
- - '0'
1134
- Content-Type:
1135
- - application/octet-stream
1136
- Date:
1137
- - Tue, 14 Oct 2014 21:37:57 GMT
1138
- Server:
1139
- - Cowboy
1140
- Connection:
1141
- - keep-alive
1142
- body:
1143
- encoding: UTF-8
1144
- string: ''
1145
- http_version:
1146
- recorded_at: Tue, 14 Oct 2014 21:37:59 GMT
1147
- - request:
1148
- method: get
1149
- uri: https://<TOKEN>:@api.80legs.com/v2/urllists/sample_find
1150
- body:
1151
- encoding: US-ASCII
1152
- string: ''
1153
- headers:
1154
- Content-Type:
1155
- - application/json
1156
- User-Agent:
1157
- - Faraday v0.9.0
1158
- Accept-Encoding:
1159
- - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
1160
- Accept:
1161
- - "*/*"
1162
- response:
1163
- status:
1164
- code: 200
1165
- message: OK
1166
- headers:
1167
- Content-Type:
1168
- - application/octet-stream
1169
- Date:
1170
- - Tue, 14 Oct 2014 21:37:57 GMT
1171
- Server:
1172
- - Cowboy
1173
- Content-Length:
1174
- - '52'
1175
- Connection:
1176
- - keep-alive
1177
- body:
1178
- encoding: UTF-8
1179
- string: |
1180
- [
1181
- "http://example.com",
1182
- "https://example.org"
1183
- ]
1184
- http_version:
1185
- recorded_at: Tue, 14 Oct 2014 21:37:59 GMT
1186
- - request:
1187
- method: delete
1188
- uri: https://<TOKEN>:@api.80legs.com/v2/urllists/sample_find
1189
- body:
1190
- encoding: US-ASCII
1191
- string: ''
1192
- headers:
1193
- Content-Type:
1194
- - application/json
1195
- User-Agent:
1196
- - Faraday v0.9.0
1197
- Accept-Encoding:
1198
- - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
1199
- Accept:
1200
- - "*/*"
1201
- response:
1202
- status:
1203
- code: 204
1204
- message: No Content
1205
- headers:
1206
- Content-Length:
1207
- - '0'
1208
- Content-Type:
1209
- - application/octet-stream
1210
- Date:
1211
- - Tue, 14 Oct 2014 21:37:57 GMT
1212
- Server:
1213
- - Cowboy
1214
- Connection:
1215
- - keep-alive
1216
- body:
1217
- encoding: UTF-8
1218
- string: ''
1219
- http_version:
1220
- recorded_at: Tue, 14 Oct 2014 21:37:59 GMT
1221
- - request:
1222
- method: post
1223
- uri: https://<TOKEN>:@api.80legs.com/v2/crawls/start_crawl
1224
- body:
1225
- encoding: UTF-8
1226
- string: '{"app":"HeaderData.js","urllist":"1","max_depth":2,"max_urls":1000}'
1227
- headers:
1228
- Content-Type:
1229
- - application/json
1230
- User-Agent:
1231
- - Faraday v0.9.0
1232
- Accept-Encoding:
1233
- - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
1234
- Accept:
1235
- - "*/*"
1236
- response:
1237
- status:
1238
- code: 204
1239
- message: No Content
1240
- headers:
1241
- Content-Length:
1242
- - '0'
1243
- Content-Type:
1244
- - application/json
1245
- Date:
1246
- - Tue, 14 Oct 2014 21:39:05 GMT
1247
- Server:
1248
- - Cowboy
1249
- Connection:
1250
- - keep-alive
1251
- body:
1252
- encoding: UTF-8
1253
- string: ''
1254
- http_version:
1255
- recorded_at: Tue, 14 Oct 2014 21:39:07 GMT
1256
- - request:
1257
- method: delete
1258
- uri: https://<TOKEN>:@api.80legs.com/v2/crawls/start_crawl
1259
- body:
1260
- encoding: US-ASCII
1261
- string: ''
1262
- headers:
1263
- Content-Type:
1264
- - application/json
1265
- User-Agent:
1266
- - Faraday v0.9.0
1267
- Accept-Encoding:
1268
- - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
1269
- Accept:
1270
- - "*/*"
1271
- response:
1272
- status:
1273
- code: 204
1274
- message: No Content
1275
- headers:
1276
- Content-Length:
1277
- - '0'
1278
- Content-Type:
1279
- - application/json
1280
- Date:
1281
- - Tue, 14 Oct 2014 21:39:05 GMT
1282
- Server:
1283
- - Cowboy
1284
- Connection:
1285
- - keep-alive
1286
- body:
1287
- encoding: UTF-8
1288
- string: ''
1289
- http_version:
1290
- recorded_at: Tue, 14 Oct 2014 21:39:08 GMT
1291
- - request:
1292
- method: post
1293
- uri: https://<TOKEN>:@api.80legs.com/v2/crawls/cancel_crawl
1294
- body:
1295
- encoding: UTF-8
1296
- string: '{"app":"HeaderData.js","urllist":"1","max_depth":2,"max_urls":1000}'
1297
- headers:
1298
- Content-Type:
1299
- - application/json
1300
- User-Agent:
1301
- - Faraday v0.9.0
1302
- Accept-Encoding:
1303
- - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
1304
- Accept:
1305
- - "*/*"
1306
- response:
1307
- status:
1308
- code: 204
1309
- message: No Content
1310
- headers:
1311
- Content-Length:
1312
- - '0'
1313
- Content-Type:
1314
- - application/json
1315
- Date:
1316
- - Tue, 14 Oct 2014 21:39:48 GMT
1317
- Server:
1318
- - Cowboy
1319
- Connection:
1320
- - keep-alive
1321
- body:
1322
- encoding: UTF-8
1323
- string: ''
1324
- http_version:
1325
- recorded_at: Tue, 14 Oct 2014 21:39:50 GMT
1326
- - request:
1327
- method: delete
1328
- uri: https://<TOKEN>:@api.80legs.com/v2/crawls/cancel_crawl
1329
- body:
1330
- encoding: US-ASCII
1331
- string: ''
1332
- headers:
1333
- Content-Type:
1334
- - application/json
1335
- User-Agent:
1336
- - Faraday v0.9.0
1337
- Accept-Encoding:
1338
- - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
1339
- Accept:
1340
- - "*/*"
1341
- response:
1342
- status:
1343
- code: 204
1344
- message: No Content
1345
- headers:
1346
- Content-Length:
1347
- - '0'
1348
- Content-Type:
1349
- - application/json
1350
634
  Date:
1351
- - Tue, 14 Oct 2014 21:39:48 GMT
635
+ - Sat, 12 Dec 2015 06:03:59 GMT
1352
636
  Server:
1353
637
  - Cowboy
1354
638
  Connection:
@@ -1357,5 +641,5 @@ http_interactions:
1357
641
  encoding: UTF-8
1358
642
  string: ''
1359
643
  http_version:
1360
- recorded_at: Tue, 14 Oct 2014 21:39:50 GMT
1361
- recorded_with: VCR 2.9.3
644
+ recorded_at: Sat, 12 Dec 2015 06:04:03 GMT
645
+ recorded_with: VCR 3.0.0