leggy 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rspec +3 -0
- data/Guardfile +33 -0
- data/leggy-0.1.0.gem +0 -0
- data/lib/leggy.rb +16 -22
- data/lib/leggy/app.rb +13 -0
- data/lib/leggy/crawl.rb +23 -0
- data/lib/leggy/crawl_options.rb +18 -0
- data/lib/leggy/helpers.rb +40 -0
- data/lib/leggy/mapping/app.rb +18 -0
- data/lib/leggy/mapping/crawl.rb +13 -0
- data/lib/leggy/mapping/crawl_options.rb +13 -0
- data/lib/leggy/mapping/url.rb +14 -0
- data/lib/leggy/mapping/user.rb +14 -0
- data/lib/leggy/resource/app.rb +55 -0
- data/lib/leggy/resource/crawl.rb +49 -0
- data/lib/leggy/resource/url.rb +55 -0
- data/lib/leggy/resource/user.rb +23 -0
- data/lib/leggy/url.rb +13 -0
- data/lib/leggy/user.rb +19 -0
- data/lib/leggy/version.rb +1 -1
- data/spec/cassettes/leggy.yml +1361 -0
- data/spec/fixtures/sample_app.js +53 -0
- data/spec/fixtures/urls.json +4 -0
- data/spec/leggy/leggy_spec.rb +177 -0
- data/spec/spec_helper.rb +45 -0
- metadata +32 -5
@@ -0,0 +1,23 @@
|
|
1
|
+
module Leggy
|
2
|
+
module Resource
|
3
|
+
class User < ResourceKit::Resource
|
4
|
+
|
5
|
+
resources do
|
6
|
+
|
7
|
+
default_handler do |response|
|
8
|
+
raise "ERROR #{response.status}: #{response.body}"
|
9
|
+
end
|
10
|
+
|
11
|
+
# GET https://api_token:@api.80legs.com/v2/users/{USER_API_TOKEN}
|
12
|
+
#
|
13
|
+
action :find do
|
14
|
+
verb :get
|
15
|
+
path '/v2/users/:api_token'
|
16
|
+
handler(200) { |response| Leggy::Mapping::User.extract_single(response.body, :read) }
|
17
|
+
end
|
18
|
+
|
19
|
+
end
|
20
|
+
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
data/lib/leggy/url.rb
ADDED
data/lib/leggy/user.rb
ADDED
data/lib/leggy/version.rb
CHANGED
@@ -0,0 +1,1361 @@
|
|
1
|
+
---
|
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
|
+
- request:
|
127
|
+
method: put
|
128
|
+
uri: https://<TOKEN>:@api.80legs.com/v2/apps/sample_all
|
129
|
+
body:
|
130
|
+
encoding: UTF-8
|
131
|
+
string: |
|
132
|
+
// This 80app returns the header data from each URL crawled
|
133
|
+
|
134
|
+
var EightyApp = function() {
|
135
|
+
this.processDocument = function(html, url, headers, status, jQuery) {
|
136
|
+
var app = this;
|
137
|
+
var $ = jQuery;
|
138
|
+
var $html = app.parseHtml(html, $);
|
139
|
+
var object = {};
|
140
|
+
|
141
|
+
if(typeof headers == 'string' || headers instanceof String) {
|
142
|
+
var headersArray = headers.split("\r\n");
|
143
|
+
for (var i = 0; i < headersArray.length; i++) {
|
144
|
+
var keyvalArray = headersArray[i].split(": ");
|
145
|
+
var key = keyvalArray[0];
|
146
|
+
var value = keyvalArray[1];
|
147
|
+
object[key] = value;
|
148
|
+
}
|
149
|
+
|
150
|
+
return JSON.stringify(object);
|
151
|
+
}
|
152
|
+
|
153
|
+
return JSON.stringify(headers);
|
154
|
+
}
|
155
|
+
|
156
|
+
this.parseLinks = function(html, url, headers, status, jQuery) {
|
157
|
+
var app = this;
|
158
|
+
var $ = jQuery;
|
159
|
+
var $html = app.parseHtml(html, $);
|
160
|
+
var links = [];
|
161
|
+
|
162
|
+
// gets all links in the html document
|
163
|
+
$html.find('a').each(function(i, obj) {
|
164
|
+
var link = app.makeLink(url, $(this).attr('href'));
|
165
|
+
if(link != null) {
|
166
|
+
links.push(link);
|
167
|
+
}
|
168
|
+
});
|
169
|
+
|
170
|
+
return links;
|
171
|
+
}
|
172
|
+
}
|
173
|
+
|
174
|
+
try {
|
175
|
+
// Testing
|
176
|
+
module.exports = function(EightyAppBase) {
|
177
|
+
EightyApp.prototype = new EightyAppBase();
|
178
|
+
return new EightyApp();
|
179
|
+
}
|
180
|
+
} catch(e) {
|
181
|
+
// Production
|
182
|
+
console.log("Eighty app exists.");
|
183
|
+
EightyApp.prototype = new EightyAppBase();
|
184
|
+
}
|
185
|
+
headers:
|
186
|
+
Content-Type:
|
187
|
+
- application/octet-stream
|
188
|
+
User-Agent:
|
189
|
+
- Faraday v0.9.0
|
190
|
+
Accept-Encoding:
|
191
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
192
|
+
Accept:
|
193
|
+
- "*/*"
|
194
|
+
response:
|
195
|
+
status:
|
196
|
+
code: 204
|
197
|
+
message: No Content
|
198
|
+
headers:
|
199
|
+
Content-Length:
|
200
|
+
- '0'
|
201
|
+
Content-Type:
|
202
|
+
- application/octet-stream
|
203
|
+
Date:
|
204
|
+
- Tue, 14 Oct 2014 21:37:53 GMT
|
205
|
+
Server:
|
206
|
+
- Cowboy
|
207
|
+
Connection:
|
208
|
+
- keep-alive
|
209
|
+
body:
|
210
|
+
encoding: UTF-8
|
211
|
+
string: ''
|
212
|
+
http_version:
|
213
|
+
recorded_at: Tue, 14 Oct 2014 21:37:55 GMT
|
214
|
+
- request:
|
215
|
+
method: get
|
216
|
+
uri: https://<TOKEN>:@api.80legs.com/v2/apps
|
217
|
+
body:
|
218
|
+
encoding: US-ASCII
|
219
|
+
string: ''
|
220
|
+
headers:
|
221
|
+
Content-Type:
|
222
|
+
- application/json
|
223
|
+
User-Agent:
|
224
|
+
- Faraday v0.9.0
|
225
|
+
Accept-Encoding:
|
226
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
227
|
+
Accept:
|
228
|
+
- "*/*"
|
229
|
+
response:
|
230
|
+
status:
|
231
|
+
code: 200
|
232
|
+
message: OK
|
233
|
+
headers:
|
234
|
+
Content-Type:
|
235
|
+
- application/json
|
236
|
+
Date:
|
237
|
+
- Tue, 14 Oct 2014 21:37:53 GMT
|
238
|
+
Server:
|
239
|
+
- Cowboy
|
240
|
+
Content-Length:
|
241
|
+
- '4636'
|
242
|
+
Connection:
|
243
|
+
- keep-alive
|
244
|
+
body:
|
245
|
+
encoding: UTF-8
|
246
|
+
string: '[{"location":"80apps/bjadslid9v7uat88n70xjz0omeyun69j/TextFromURLListOnly.js","name":"TextFromURLListOnly.js","description":"Returns
|
247
|
+
text from each URL crawled, only on URLs that have the same domain as the
|
248
|
+
current URL being crawled","user":"bjadslid9v7uat88n70xjz0omeyun69j","date_created":"2014-9-23"},{"location":"80apps/bjadslid9v7uat88n70xjz0omeyun69j/LossyPageContentInternalLinks.js","name":"LossyPageContentInternalLinks.js","description":"Returns
|
249
|
+
the HTML with all style, blocks, script blocks, and HTML tags stripped out.","user":"bjadslid9v7uat88n70xjz0omeyun69j","date_created":"2014-7-17"},{"location":"80apps/bjadslid9v7uat88n70xjz0omeyun69j/LossyPageContent.js","name":"LossyPageContent.js","description":"Returns
|
250
|
+
the HTML with all style, blocks, script blocks, and HTML tags stripped out.","user":"bjadslid9v7uat88n70xjz0omeyun69j","date_created":"2014-7-17"},{"location":"80apps/bjadslid9v7uat88n70xjz0omeyun69j/LossyDocumentData.js","name":"LossyDocumentData.js","description":"Returns
|
251
|
+
the following attributes from each URL crawled: title, meta tags, links (everything
|
252
|
+
in an ''a'' tag)","user":"bjadslid9v7uat88n70xjz0omeyun69j","date_created":"2014-7-17"},{"location":"80apps/bjadslid9v7uat88n70xjz0omeyun69j/LinkTracer.js","name":"LinkTracer.js","description":"Returns
|
253
|
+
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
|
259
|
+
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
|
+
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
|
+
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
|
+
all links found on a page","user":"bjadslid9v7uat88n70xjz0omeyun69j","date_created":"2014-7-17"},{"location":"80apps/bjadslid9v7uat88n70xjz0omeyun69j/EmailsAndPageContent.js","name":"EmailsAndPageContent.js","description":"Returns
|
263
|
+
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
|
265
|
+
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
|
+
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"}]'
|
269
|
+
http_version:
|
270
|
+
recorded_at: Tue, 14 Oct 2014 21:37:55 GMT
|
271
|
+
- request:
|
272
|
+
method: delete
|
273
|
+
uri: https://<TOKEN>:@api.80legs.com/v2/apps/sample_all
|
274
|
+
body:
|
275
|
+
encoding: US-ASCII
|
276
|
+
string: ''
|
277
|
+
headers:
|
278
|
+
Content-Type:
|
279
|
+
- application/json
|
280
|
+
User-Agent:
|
281
|
+
- Faraday v0.9.0
|
282
|
+
Accept-Encoding:
|
283
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
284
|
+
Accept:
|
285
|
+
- "*/*"
|
286
|
+
response:
|
287
|
+
status:
|
288
|
+
code: 204
|
289
|
+
message: No Content
|
290
|
+
headers:
|
291
|
+
Content-Length:
|
292
|
+
- '0'
|
293
|
+
Content-Type:
|
294
|
+
- application/octet-stream
|
295
|
+
Date:
|
296
|
+
- Tue, 14 Oct 2014 21:37:53 GMT
|
297
|
+
Server:
|
298
|
+
- Cowboy
|
299
|
+
Connection:
|
300
|
+
- keep-alive
|
301
|
+
body:
|
302
|
+
encoding: UTF-8
|
303
|
+
string: ''
|
304
|
+
http_version:
|
305
|
+
recorded_at: Tue, 14 Oct 2014 21:37:55 GMT
|
306
|
+
- request:
|
307
|
+
method: put
|
308
|
+
uri: https://<TOKEN>:@api.80legs.com/v2/apps/sample_delete
|
309
|
+
body:
|
310
|
+
encoding: UTF-8
|
311
|
+
string: |
|
312
|
+
// This 80app returns the header data from each URL crawled
|
313
|
+
|
314
|
+
var EightyApp = function() {
|
315
|
+
this.processDocument = function(html, url, headers, status, jQuery) {
|
316
|
+
var app = this;
|
317
|
+
var $ = jQuery;
|
318
|
+
var $html = app.parseHtml(html, $);
|
319
|
+
var object = {};
|
320
|
+
|
321
|
+
if(typeof headers == 'string' || headers instanceof String) {
|
322
|
+
var headersArray = headers.split("\r\n");
|
323
|
+
for (var i = 0; i < headersArray.length; i++) {
|
324
|
+
var keyvalArray = headersArray[i].split(": ");
|
325
|
+
var key = keyvalArray[0];
|
326
|
+
var value = keyvalArray[1];
|
327
|
+
object[key] = value;
|
328
|
+
}
|
329
|
+
|
330
|
+
return JSON.stringify(object);
|
331
|
+
}
|
332
|
+
|
333
|
+
return JSON.stringify(headers);
|
334
|
+
}
|
335
|
+
|
336
|
+
this.parseLinks = function(html, url, headers, status, jQuery) {
|
337
|
+
var app = this;
|
338
|
+
var $ = jQuery;
|
339
|
+
var $html = app.parseHtml(html, $);
|
340
|
+
var links = [];
|
341
|
+
|
342
|
+
// gets all links in the html document
|
343
|
+
$html.find('a').each(function(i, obj) {
|
344
|
+
var link = app.makeLink(url, $(this).attr('href'));
|
345
|
+
if(link != null) {
|
346
|
+
links.push(link);
|
347
|
+
}
|
348
|
+
});
|
349
|
+
|
350
|
+
return links;
|
351
|
+
}
|
352
|
+
}
|
353
|
+
|
354
|
+
try {
|
355
|
+
// Testing
|
356
|
+
module.exports = function(EightyAppBase) {
|
357
|
+
EightyApp.prototype = new EightyAppBase();
|
358
|
+
return new EightyApp();
|
359
|
+
}
|
360
|
+
} catch(e) {
|
361
|
+
// Production
|
362
|
+
console.log("Eighty app exists.");
|
363
|
+
EightyApp.prototype = new EightyAppBase();
|
364
|
+
}
|
365
|
+
headers:
|
366
|
+
Content-Type:
|
367
|
+
- application/octet-stream
|
368
|
+
User-Agent:
|
369
|
+
- Faraday v0.9.0
|
370
|
+
Accept-Encoding:
|
371
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
372
|
+
Accept:
|
373
|
+
- "*/*"
|
374
|
+
response:
|
375
|
+
status:
|
376
|
+
code: 204
|
377
|
+
message: No Content
|
378
|
+
headers:
|
379
|
+
Content-Length:
|
380
|
+
- '0'
|
381
|
+
Content-Type:
|
382
|
+
- application/octet-stream
|
383
|
+
Date:
|
384
|
+
- Tue, 14 Oct 2014 21:37:53 GMT
|
385
|
+
Server:
|
386
|
+
- Cowboy
|
387
|
+
Connection:
|
388
|
+
- keep-alive
|
389
|
+
body:
|
390
|
+
encoding: UTF-8
|
391
|
+
string: ''
|
392
|
+
http_version:
|
393
|
+
recorded_at: Tue, 14 Oct 2014 21:37:55 GMT
|
394
|
+
- request:
|
395
|
+
method: delete
|
396
|
+
uri: https://<TOKEN>:@api.80legs.com/v2/apps/sample_delete
|
397
|
+
body:
|
398
|
+
encoding: US-ASCII
|
399
|
+
string: ''
|
400
|
+
headers:
|
401
|
+
Content-Type:
|
402
|
+
- application/json
|
403
|
+
User-Agent:
|
404
|
+
- Faraday v0.9.0
|
405
|
+
Accept-Encoding:
|
406
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
407
|
+
Accept:
|
408
|
+
- "*/*"
|
409
|
+
response:
|
410
|
+
status:
|
411
|
+
code: 204
|
412
|
+
message: No Content
|
413
|
+
headers:
|
414
|
+
Content-Length:
|
415
|
+
- '0'
|
416
|
+
Content-Type:
|
417
|
+
- application/octet-stream
|
418
|
+
Date:
|
419
|
+
- Tue, 14 Oct 2014 21:37:53 GMT
|
420
|
+
Server:
|
421
|
+
- Cowboy
|
422
|
+
Connection:
|
423
|
+
- keep-alive
|
424
|
+
body:
|
425
|
+
encoding: UTF-8
|
426
|
+
string: ''
|
427
|
+
http_version:
|
428
|
+
recorded_at: Tue, 14 Oct 2014 21:37:56 GMT
|
429
|
+
- request:
|
430
|
+
method: put
|
431
|
+
uri: https://<TOKEN>:@api.80legs.com/v2/apps/sample_find
|
432
|
+
body:
|
433
|
+
encoding: UTF-8
|
434
|
+
string: |
|
435
|
+
// This 80app returns the header data from each URL crawled
|
436
|
+
|
437
|
+
var EightyApp = function() {
|
438
|
+
this.processDocument = function(html, url, headers, status, jQuery) {
|
439
|
+
var app = this;
|
440
|
+
var $ = jQuery;
|
441
|
+
var $html = app.parseHtml(html, $);
|
442
|
+
var object = {};
|
443
|
+
|
444
|
+
if(typeof headers == 'string' || headers instanceof String) {
|
445
|
+
var headersArray = headers.split("\r\n");
|
446
|
+
for (var i = 0; i < headersArray.length; i++) {
|
447
|
+
var keyvalArray = headersArray[i].split(": ");
|
448
|
+
var key = keyvalArray[0];
|
449
|
+
var value = keyvalArray[1];
|
450
|
+
object[key] = value;
|
451
|
+
}
|
452
|
+
|
453
|
+
return JSON.stringify(object);
|
454
|
+
}
|
455
|
+
|
456
|
+
return JSON.stringify(headers);
|
457
|
+
}
|
458
|
+
|
459
|
+
this.parseLinks = function(html, url, headers, status, jQuery) {
|
460
|
+
var app = this;
|
461
|
+
var $ = jQuery;
|
462
|
+
var $html = app.parseHtml(html, $);
|
463
|
+
var links = [];
|
464
|
+
|
465
|
+
// gets all links in the html document
|
466
|
+
$html.find('a').each(function(i, obj) {
|
467
|
+
var link = app.makeLink(url, $(this).attr('href'));
|
468
|
+
if(link != null) {
|
469
|
+
links.push(link);
|
470
|
+
}
|
471
|
+
});
|
472
|
+
|
473
|
+
return links;
|
474
|
+
}
|
475
|
+
}
|
476
|
+
|
477
|
+
try {
|
478
|
+
// Testing
|
479
|
+
module.exports = function(EightyAppBase) {
|
480
|
+
EightyApp.prototype = new EightyAppBase();
|
481
|
+
return new EightyApp();
|
482
|
+
}
|
483
|
+
} catch(e) {
|
484
|
+
// Production
|
485
|
+
console.log("Eighty app exists.");
|
486
|
+
EightyApp.prototype = new EightyAppBase();
|
487
|
+
}
|
488
|
+
headers:
|
489
|
+
Content-Type:
|
490
|
+
- application/octet-stream
|
491
|
+
User-Agent:
|
492
|
+
- Faraday v0.9.0
|
493
|
+
Accept-Encoding:
|
494
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
495
|
+
Accept:
|
496
|
+
- "*/*"
|
497
|
+
response:
|
498
|
+
status:
|
499
|
+
code: 204
|
500
|
+
message: No Content
|
501
|
+
headers:
|
502
|
+
Content-Length:
|
503
|
+
- '0'
|
504
|
+
Content-Type:
|
505
|
+
- application/octet-stream
|
506
|
+
Date:
|
507
|
+
- Tue, 14 Oct 2014 21:37:54 GMT
|
508
|
+
Server:
|
509
|
+
- Cowboy
|
510
|
+
Connection:
|
511
|
+
- keep-alive
|
512
|
+
body:
|
513
|
+
encoding: UTF-8
|
514
|
+
string: ''
|
515
|
+
http_version:
|
516
|
+
recorded_at: Tue, 14 Oct 2014 21:37:56 GMT
|
517
|
+
- request:
|
518
|
+
method: get
|
519
|
+
uri: https://<TOKEN>:@api.80legs.com/v2/apps/sample_find
|
520
|
+
body:
|
521
|
+
encoding: US-ASCII
|
522
|
+
string: ''
|
523
|
+
headers:
|
524
|
+
Content-Type:
|
525
|
+
- application/json
|
526
|
+
User-Agent:
|
527
|
+
- Faraday v0.9.0
|
528
|
+
Accept-Encoding:
|
529
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
530
|
+
Accept:
|
531
|
+
- "*/*"
|
532
|
+
response:
|
533
|
+
status:
|
534
|
+
code: 200
|
535
|
+
message: OK
|
536
|
+
headers:
|
537
|
+
Content-Type:
|
538
|
+
- application/octet-stream
|
539
|
+
Date:
|
540
|
+
- Tue, 14 Oct 2014 21:37:54 GMT
|
541
|
+
Server:
|
542
|
+
- Cowboy
|
543
|
+
Content-Length:
|
544
|
+
- '1852'
|
545
|
+
Connection:
|
546
|
+
- keep-alive
|
547
|
+
body:
|
548
|
+
encoding: UTF-8
|
549
|
+
string: |
|
550
|
+
// This 80app returns the header data from each URL crawled
|
551
|
+
|
552
|
+
var EightyApp = function() {
|
553
|
+
this.processDocument = function(html, url, headers, status, jQuery) {
|
554
|
+
var app = this;
|
555
|
+
var $ = jQuery;
|
556
|
+
var $html = app.parseHtml(html, $);
|
557
|
+
var object = {};
|
558
|
+
|
559
|
+
if(typeof headers == 'string' || headers instanceof String) {
|
560
|
+
var headersArray = headers.split("\r\n");
|
561
|
+
for (var i = 0; i < headersArray.length; i++) {
|
562
|
+
var keyvalArray = headersArray[i].split(": ");
|
563
|
+
var key = keyvalArray[0];
|
564
|
+
var value = keyvalArray[1];
|
565
|
+
object[key] = value;
|
566
|
+
}
|
567
|
+
|
568
|
+
return JSON.stringify(object);
|
569
|
+
}
|
570
|
+
|
571
|
+
return JSON.stringify(headers);
|
572
|
+
}
|
573
|
+
|
574
|
+
this.parseLinks = function(html, url, headers, status, jQuery) {
|
575
|
+
var app = this;
|
576
|
+
var $ = jQuery;
|
577
|
+
var $html = app.parseHtml(html, $);
|
578
|
+
var links = [];
|
579
|
+
|
580
|
+
// gets all links in the html document
|
581
|
+
$html.find('a').each(function(i, obj) {
|
582
|
+
var link = app.makeLink(url, $(this).attr('href'));
|
583
|
+
if(link != null) {
|
584
|
+
links.push(link);
|
585
|
+
}
|
586
|
+
});
|
587
|
+
|
588
|
+
return links;
|
589
|
+
}
|
590
|
+
}
|
591
|
+
|
592
|
+
try {
|
593
|
+
// Testing
|
594
|
+
module.exports = function(EightyAppBase) {
|
595
|
+
EightyApp.prototype = new EightyAppBase();
|
596
|
+
return new EightyApp();
|
597
|
+
}
|
598
|
+
} catch(e) {
|
599
|
+
// Production
|
600
|
+
console.log("Eighty app exists.");
|
601
|
+
EightyApp.prototype = new EightyAppBase();
|
602
|
+
}
|
603
|
+
http_version:
|
604
|
+
recorded_at: Tue, 14 Oct 2014 21:37:56 GMT
|
605
|
+
- request:
|
606
|
+
method: delete
|
607
|
+
uri: https://<TOKEN>:@api.80legs.com/v2/apps/sample_find
|
608
|
+
body:
|
609
|
+
encoding: US-ASCII
|
610
|
+
string: ''
|
611
|
+
headers:
|
612
|
+
Content-Type:
|
613
|
+
- application/json
|
614
|
+
User-Agent:
|
615
|
+
- Faraday v0.9.0
|
616
|
+
Accept-Encoding:
|
617
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
618
|
+
Accept:
|
619
|
+
- "*/*"
|
620
|
+
response:
|
621
|
+
status:
|
622
|
+
code: 204
|
623
|
+
message: No Content
|
624
|
+
headers:
|
625
|
+
Content-Length:
|
626
|
+
- '0'
|
627
|
+
Content-Type:
|
628
|
+
- application/octet-stream
|
629
|
+
Date:
|
630
|
+
- Tue, 14 Oct 2014 21:37:54 GMT
|
631
|
+
Server:
|
632
|
+
- Cowboy
|
633
|
+
Connection:
|
634
|
+
- keep-alive
|
635
|
+
body:
|
636
|
+
encoding: UTF-8
|
637
|
+
string: ''
|
638
|
+
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
|
675
|
+
- request:
|
676
|
+
method: post
|
677
|
+
uri: https://<TOKEN>:@api.80legs.com/v2/crawls/status_crawl
|
678
|
+
body:
|
679
|
+
encoding: UTF-8
|
680
|
+
string: '{"app":"HeaderData.js","urllist":"1","max_depth":2,"max_urls":1000}'
|
681
|
+
headers:
|
682
|
+
Content-Type:
|
683
|
+
- application/json
|
684
|
+
User-Agent:
|
685
|
+
- Faraday v0.9.0
|
686
|
+
Accept-Encoding:
|
687
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
688
|
+
Accept:
|
689
|
+
- "*/*"
|
690
|
+
response:
|
691
|
+
status:
|
692
|
+
code: 204
|
693
|
+
message: No Content
|
694
|
+
headers:
|
695
|
+
Content-Length:
|
696
|
+
- '0'
|
697
|
+
Content-Type:
|
698
|
+
- application/json
|
699
|
+
Date:
|
700
|
+
- Tue, 14 Oct 2014 21:37:54 GMT
|
701
|
+
Server:
|
702
|
+
- Cowboy
|
703
|
+
Connection:
|
704
|
+
- keep-alive
|
705
|
+
body:
|
706
|
+
encoding: UTF-8
|
707
|
+
string: ''
|
708
|
+
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
|
746
|
+
- request:
|
747
|
+
method: delete
|
748
|
+
uri: https://<TOKEN>:@api.80legs.com/v2/crawls/status_crawl
|
749
|
+
body:
|
750
|
+
encoding: US-ASCII
|
751
|
+
string: ''
|
752
|
+
headers:
|
753
|
+
Content-Type:
|
754
|
+
- application/json
|
755
|
+
User-Agent:
|
756
|
+
- Faraday v0.9.0
|
757
|
+
Accept-Encoding:
|
758
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
759
|
+
Accept:
|
760
|
+
- "*/*"
|
761
|
+
response:
|
762
|
+
status:
|
763
|
+
code: 204
|
764
|
+
message: No Content
|
765
|
+
headers:
|
766
|
+
Content-Length:
|
767
|
+
- '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
|
+
Content-Type:
|
937
|
+
- 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
|
+
Date:
|
1351
|
+
- Tue, 14 Oct 2014 21:39:48 GMT
|
1352
|
+
Server:
|
1353
|
+
- Cowboy
|
1354
|
+
Connection:
|
1355
|
+
- keep-alive
|
1356
|
+
body:
|
1357
|
+
encoding: UTF-8
|
1358
|
+
string: ''
|
1359
|
+
http_version:
|
1360
|
+
recorded_at: Tue, 14 Oct 2014 21:39:50 GMT
|
1361
|
+
recorded_with: VCR 2.9.3
|