grabzit 3.5.4 → 3.5.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/grabzit/docxoptions.rb +16 -1
- data/lib/grabzit/htmloptions.rb +47 -2
- data/lib/grabzit/imageoptions.rb +16 -1
- data/lib/grabzit/pdfoptions.rb +17 -2
- data/lib/grabzit/videooptions.rb +18 -2
- metadata +2 -5
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: e1484676d666a8e9cae4448b2005b1be6d9b4f42b2d07d63e127aef3dabe2fa4
|
|
4
|
+
data.tar.gz: 39e284516c8cb45281b35c23ef488aa3047c1e8939db8313ccf276f703c28c9b
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: da6ef1b151e29232c53449fce8c6110f43883f32c5c00729362df5f8005015cbb66d9dae3417252356ed859d823bbc520d32aa9bf40bbced2f23b949fec83c42
|
|
7
|
+
data.tar.gz: 7bbf2210b6aad5b1ecfd75baab699e49277bd7ffad0da1b900eff4d5bac838f3fe384bfa72798fdab2b8c6f725d0979a80dd8f22b409cb46f089d593911f23fe
|
data/lib/grabzit/docxoptions.rb
CHANGED
|
@@ -33,6 +33,7 @@ module GrabzIt
|
|
|
33
33
|
@address = nil
|
|
34
34
|
@password = nil
|
|
35
35
|
@clickElement = nil
|
|
36
|
+
@jsCode = nil
|
|
36
37
|
end
|
|
37
38
|
|
|
38
39
|
# @return [Boolean] true if the background images of the web page should be included in the DOCX
|
|
@@ -392,6 +393,19 @@ module GrabzIt
|
|
|
392
393
|
def add_template_parameter(name, value)
|
|
393
394
|
@templateVariables = appendParameter(@templateVariables, name, value)
|
|
394
395
|
end
|
|
396
|
+
|
|
397
|
+
# @return [String] get the JavaScript code that will be execute in the web page before the capture is performed
|
|
398
|
+
def jsCode
|
|
399
|
+
@jsCode
|
|
400
|
+
end
|
|
401
|
+
|
|
402
|
+
# Set the JavaScript code that will be execute in the web page before the capture is performed
|
|
403
|
+
#
|
|
404
|
+
# @param value [String] the javascript to execute
|
|
405
|
+
# @return [void]
|
|
406
|
+
def jsCode=(value)
|
|
407
|
+
@jsCode = value
|
|
408
|
+
end
|
|
395
409
|
|
|
396
410
|
# @!visibility private
|
|
397
411
|
def _getSignatureString(applicationSecret, callBackURL, url = nil)
|
|
@@ -401,7 +415,7 @@ module GrabzIt
|
|
|
401
415
|
items.push(GrabzIt::Utility.nil_check(url))
|
|
402
416
|
end
|
|
403
417
|
|
|
404
|
-
items.push(GrabzIt::Utility.nil_check(callBackURL),GrabzIt::Utility.nil_check(@customId),GrabzIt::Utility.b_to_str(@includeBackground),@pagesize ,@orientation,GrabzIt::Utility.b_to_str(@includeImages),GrabzIt::Utility.b_to_str(@includeLinks),GrabzIt::Utility.nil_check(@title),GrabzIt::Utility.nil_int_check(@marginTop),GrabzIt::Utility.nil_int_check(@marginLeft),GrabzIt::Utility.nil_int_check(@marginBottom),GrabzIt::Utility.nil_int_check(@marginRight),GrabzIt::Utility.nil_int_check(@delay),GrabzIt::Utility.nil_int_check(@requestAs),GrabzIt::Utility.nil_check(@country),GrabzIt::Utility.nil_int_check(@quality),GrabzIt::Utility.nil_check(@hideElement),GrabzIt::Utility.nil_check(@exportURL),GrabzIt::Utility.nil_check(@waitForElement),GrabzIt::Utility.nil_check(@encryptionKey),GrabzIt::Utility.b_to_str(@noAds),GrabzIt::Utility.nil_check(@post),GrabzIt::Utility.nil_check(@targetElement),GrabzIt::Utility.nil_check(@templateId),GrabzIt::Utility.nil_check(@templateVariables),GrabzIt::Utility.nil_int_check(@height),GrabzIt::Utility.nil_int_check(@width),GrabzIt::Utility.nil_int_check(@browserWidth),GrabzIt::Utility.nil_check(@proxy),GrabzIt::Utility.nil_check(@mergeId),GrabzIt::Utility.nil_check(@address),GrabzIt::Utility.b_to_str(@noCookieNotifications),GrabzIt::Utility.nil_check(@password),GrabzIt::Utility.nil_check(@clickElement))
|
|
418
|
+
items.push(GrabzIt::Utility.nil_check(callBackURL),GrabzIt::Utility.nil_check(@customId),GrabzIt::Utility.b_to_str(@includeBackground),@pagesize ,@orientation,GrabzIt::Utility.b_to_str(@includeImages),GrabzIt::Utility.b_to_str(@includeLinks),GrabzIt::Utility.nil_check(@title),GrabzIt::Utility.nil_int_check(@marginTop),GrabzIt::Utility.nil_int_check(@marginLeft),GrabzIt::Utility.nil_int_check(@marginBottom),GrabzIt::Utility.nil_int_check(@marginRight),GrabzIt::Utility.nil_int_check(@delay),GrabzIt::Utility.nil_int_check(@requestAs),GrabzIt::Utility.nil_check(@country),GrabzIt::Utility.nil_int_check(@quality),GrabzIt::Utility.nil_check(@hideElement),GrabzIt::Utility.nil_check(@exportURL),GrabzIt::Utility.nil_check(@waitForElement),GrabzIt::Utility.nil_check(@encryptionKey),GrabzIt::Utility.b_to_str(@noAds),GrabzIt::Utility.nil_check(@post),GrabzIt::Utility.nil_check(@targetElement),GrabzIt::Utility.nil_check(@templateId),GrabzIt::Utility.nil_check(@templateVariables),GrabzIt::Utility.nil_int_check(@height),GrabzIt::Utility.nil_int_check(@width),GrabzIt::Utility.nil_int_check(@browserWidth),GrabzIt::Utility.nil_check(@proxy),GrabzIt::Utility.nil_check(@mergeId),GrabzIt::Utility.nil_check(@address),GrabzIt::Utility.b_to_str(@noCookieNotifications),GrabzIt::Utility.nil_check(@password),GrabzIt::Utility.nil_check(@clickElement),GrabzIt::Utility.nil_check(@jsCode))
|
|
405
419
|
return items.join("|")
|
|
406
420
|
end
|
|
407
421
|
|
|
@@ -436,6 +450,7 @@ module GrabzIt
|
|
|
436
450
|
params['nonotify'] = GrabzIt::Utility.b_to_str(@noCookieNotifications)
|
|
437
451
|
params['password'] = GrabzIt::Utility.nil_check(@password)
|
|
438
452
|
params['click'] = GrabzIt::Utility.nil_check(@clickElement)
|
|
453
|
+
params['jscode'] = GrabzIt::Utility.nil_check(@jsCode)
|
|
439
454
|
|
|
440
455
|
return params;
|
|
441
456
|
end
|
data/lib/grabzit/htmloptions.rb
CHANGED
|
@@ -14,6 +14,9 @@ module GrabzIt
|
|
|
14
14
|
@noAds = false
|
|
15
15
|
@noCookieNotifications = false
|
|
16
16
|
@address = nil
|
|
17
|
+
@clickElement = nil
|
|
18
|
+
@jsCode = nil
|
|
19
|
+
@inlineHTML = false
|
|
17
20
|
end
|
|
18
21
|
|
|
19
22
|
# @return [Integer] the width of the browser in pixels
|
|
@@ -67,6 +70,19 @@ module GrabzIt
|
|
|
67
70
|
def waitForElement=(value)
|
|
68
71
|
@waitForElement = value
|
|
69
72
|
end
|
|
73
|
+
|
|
74
|
+
# @return [String] get the CSS selector of the HTML element in the web page that must clicked before the capture is performed
|
|
75
|
+
def clickElement
|
|
76
|
+
@clickElement
|
|
77
|
+
end
|
|
78
|
+
|
|
79
|
+
# Set the CSS selector of the HTML element in the web page that must clicked before the capture is performed
|
|
80
|
+
#
|
|
81
|
+
# @param value [String] the element to click
|
|
82
|
+
# @return [void]
|
|
83
|
+
def clickElement=(value)
|
|
84
|
+
@clickElement = value
|
|
85
|
+
end
|
|
70
86
|
|
|
71
87
|
# @return [Integer] get which user agent type should be used
|
|
72
88
|
def requestAs
|
|
@@ -107,6 +123,19 @@ module GrabzIt
|
|
|
107
123
|
@noCookieNotifications = value
|
|
108
124
|
end
|
|
109
125
|
|
|
126
|
+
# @return [Boolean] get if the HTML should be inlined
|
|
127
|
+
def inlineHTML
|
|
128
|
+
@inlineHTML
|
|
129
|
+
end
|
|
130
|
+
|
|
131
|
+
# Set to true if the resources in a web page should be inlined in the HTML
|
|
132
|
+
#
|
|
133
|
+
# @param value [Boolean] HTML should be inlined
|
|
134
|
+
# @return [void]
|
|
135
|
+
def inlineHTML=(value)
|
|
136
|
+
@inlineHTML = value
|
|
137
|
+
end
|
|
138
|
+
|
|
110
139
|
# @return [String] get the URL to execute the HTML code in
|
|
111
140
|
def address
|
|
112
141
|
@address
|
|
@@ -119,6 +148,19 @@ module GrabzIt
|
|
|
119
148
|
def address=(value)
|
|
120
149
|
@address = value
|
|
121
150
|
end
|
|
151
|
+
|
|
152
|
+
# @return [String] get the JavaScript code that will be execute in the web page before the capture is performed
|
|
153
|
+
def jsCode
|
|
154
|
+
@jsCode
|
|
155
|
+
end
|
|
156
|
+
|
|
157
|
+
# Set the JavaScript code that will be execute in the web page before the capture is performed
|
|
158
|
+
#
|
|
159
|
+
# @param value [String] the javascript to execute
|
|
160
|
+
# @return [void]
|
|
161
|
+
def jsCode=(value)
|
|
162
|
+
@jsCode = value
|
|
163
|
+
end
|
|
122
164
|
|
|
123
165
|
# Define a HTTP Post parameter and optionally value, this method can be called multiple times to add multiple parameters. Using this method will force
|
|
124
166
|
# GrabzIt to perform a HTTP post.
|
|
@@ -137,7 +179,7 @@ module GrabzIt
|
|
|
137
179
|
items.push(GrabzIt::Utility.nil_check(url))
|
|
138
180
|
end
|
|
139
181
|
|
|
140
|
-
items.push(GrabzIt::Utility.nil_check(callBackURL),GrabzIt::Utility.nil_int_check(@browserHeight),GrabzIt::Utility.nil_int_check(@browserWidth),GrabzIt::Utility.nil_check(@customId),GrabzIt::Utility.nil_int_check(@delay),GrabzIt::Utility.nil_int_check(@requestAs),GrabzIt::Utility.nil_check(@country),GrabzIt::Utility.nil_check(@exportURL),GrabzIt::Utility.nil_check(@waitForElement),GrabzIt::Utility.nil_check(@encryptionKey),GrabzIt::Utility.b_to_str(@noAds),GrabzIt::Utility.nil_check(@post),GrabzIt::Utility.nil_check(@proxy),GrabzIt::Utility.nil_check(@address),GrabzIt::Utility.b_to_str(@noCookieNotifications))
|
|
182
|
+
items.push(GrabzIt::Utility.nil_check(callBackURL),GrabzIt::Utility.nil_int_check(@browserHeight),GrabzIt::Utility.nil_int_check(@browserWidth),GrabzIt::Utility.nil_check(@customId),GrabzIt::Utility.nil_int_check(@delay),GrabzIt::Utility.nil_int_check(@requestAs),GrabzIt::Utility.nil_check(@country),GrabzIt::Utility.nil_check(@exportURL),GrabzIt::Utility.nil_check(@waitForElement),GrabzIt::Utility.nil_check(@encryptionKey),GrabzIt::Utility.b_to_str(@noAds),GrabzIt::Utility.nil_check(@post),GrabzIt::Utility.nil_check(@proxy),GrabzIt::Utility.nil_check(@address),GrabzIt::Utility.b_to_str(@noCookieNotifications),GrabzIt::Utility.nil_check(@clickElement),GrabzIt::Utility.nil_check(@jsCode),GrabzIt::Utility.b_to_str(@inlineHTML))
|
|
141
183
|
|
|
142
184
|
return items.join("|")
|
|
143
185
|
end
|
|
@@ -154,7 +196,10 @@ module GrabzIt
|
|
|
154
196
|
params['post'] = GrabzIt::Utility.nil_check(@post)
|
|
155
197
|
params['address'] = GrabzIt::Utility.nil_check(@address)
|
|
156
198
|
params['nonotify'] = GrabzIt::Utility.b_to_str(@noCookieNotifications)
|
|
157
|
-
|
|
199
|
+
params['click'] = GrabzIt::Utility.nil_check(@clickElement)
|
|
200
|
+
params['jscode'] = GrabzIt::Utility.nil_check(@jsCode)
|
|
201
|
+
params['inlinehtml'] = GrabzIt::Utility.b_to_str(@inlineHTML)
|
|
202
|
+
|
|
158
203
|
return params
|
|
159
204
|
end
|
|
160
205
|
end
|
data/lib/grabzit/imageoptions.rb
CHANGED
|
@@ -24,6 +24,7 @@ module GrabzIt
|
|
|
24
24
|
@address = nil
|
|
25
25
|
@hd = false
|
|
26
26
|
@clickElement = nil
|
|
27
|
+
@jsCode = nil
|
|
27
28
|
end
|
|
28
29
|
|
|
29
30
|
# @return [Integer] the width of the browser in pixels
|
|
@@ -259,6 +260,19 @@ module GrabzIt
|
|
|
259
260
|
def address=(value)
|
|
260
261
|
@address = value
|
|
261
262
|
end
|
|
263
|
+
|
|
264
|
+
# @return [String] get the JavaScript code that will be execute in the web page before the capture is performed
|
|
265
|
+
def jsCode
|
|
266
|
+
@jsCode
|
|
267
|
+
end
|
|
268
|
+
|
|
269
|
+
# Set the JavaScript code that will be execute in the web page before the capture is performed
|
|
270
|
+
#
|
|
271
|
+
# @param value [String] the javascript to execute
|
|
272
|
+
# @return [void]
|
|
273
|
+
def jsCode=(value)
|
|
274
|
+
@jsCode = value
|
|
275
|
+
end
|
|
262
276
|
|
|
263
277
|
# Define a HTTP Post parameter and optionally value, this method can be called multiple times to add multiple parameters. Using this method will force
|
|
264
278
|
# GrabzIt to perform a HTTP post.
|
|
@@ -277,7 +291,7 @@ module GrabzIt
|
|
|
277
291
|
items.push(GrabzIt::Utility.nil_check(url))
|
|
278
292
|
end
|
|
279
293
|
|
|
280
|
-
items.push(GrabzIt::Utility.nil_check(callBackURL),GrabzIt::Utility.nil_check(@format),GrabzIt::Utility.nil_int_check(@height),GrabzIt::Utility.nil_int_check(@width),GrabzIt::Utility.nil_int_check(@browserHeight),GrabzIt::Utility.nil_int_check(@browserWidth),GrabzIt::Utility.nil_check(@customId),GrabzIt::Utility.nil_int_check(@delay),GrabzIt::Utility.nil_check(@targetElement),GrabzIt::Utility.nil_check(@customWaterMarkId),GrabzIt::Utility.nil_int_check(@requestAs),GrabzIt::Utility.nil_check(@country),GrabzIt::Utility.nil_int_check(@quality),GrabzIt::Utility.nil_check(@hideElement),GrabzIt::Utility.nil_check(@exportURL),GrabzIt::Utility.nil_check(@waitForElement),GrabzIt::Utility.b_to_str(@transparent),GrabzIt::Utility.nil_check(@encryptionKey),GrabzIt::Utility.b_to_str(@noAds),GrabzIt::Utility.nil_check(@post),GrabzIt::Utility.nil_check(@proxy),GrabzIt::Utility.nil_check(@address),GrabzIt::Utility.b_to_str(@noCookieNotifications),GrabzIt::Utility.b_to_str(@hd),GrabzIt::Utility.nil_check(@clickElement))
|
|
294
|
+
items.push(GrabzIt::Utility.nil_check(callBackURL),GrabzIt::Utility.nil_check(@format),GrabzIt::Utility.nil_int_check(@height),GrabzIt::Utility.nil_int_check(@width),GrabzIt::Utility.nil_int_check(@browserHeight),GrabzIt::Utility.nil_int_check(@browserWidth),GrabzIt::Utility.nil_check(@customId),GrabzIt::Utility.nil_int_check(@delay),GrabzIt::Utility.nil_check(@targetElement),GrabzIt::Utility.nil_check(@customWaterMarkId),GrabzIt::Utility.nil_int_check(@requestAs),GrabzIt::Utility.nil_check(@country),GrabzIt::Utility.nil_int_check(@quality),GrabzIt::Utility.nil_check(@hideElement),GrabzIt::Utility.nil_check(@exportURL),GrabzIt::Utility.nil_check(@waitForElement),GrabzIt::Utility.b_to_str(@transparent),GrabzIt::Utility.nil_check(@encryptionKey),GrabzIt::Utility.b_to_str(@noAds),GrabzIt::Utility.nil_check(@post),GrabzIt::Utility.nil_check(@proxy),GrabzIt::Utility.nil_check(@address),GrabzIt::Utility.b_to_str(@noCookieNotifications),GrabzIt::Utility.b_to_str(@hd),GrabzIt::Utility.nil_check(@clickElement),GrabzIt::Utility.nil_check(@jsCode))
|
|
281
295
|
|
|
282
296
|
return items.join("|")
|
|
283
297
|
end
|
|
@@ -304,6 +318,7 @@ module GrabzIt
|
|
|
304
318
|
params['nonotify'] = GrabzIt::Utility.b_to_str(@noCookieNotifications)
|
|
305
319
|
params['hd'] = GrabzIt::Utility.b_to_str(@hd)
|
|
306
320
|
params['click'] = GrabzIt::Utility.nil_check(@clickElement)
|
|
321
|
+
params['jscode'] = GrabzIt::Utility.nil_check(@jsCode)
|
|
307
322
|
|
|
308
323
|
return params
|
|
309
324
|
end
|
data/lib/grabzit/pdfoptions.rb
CHANGED
|
@@ -36,6 +36,7 @@ module GrabzIt
|
|
|
36
36
|
@cssMediaType = nil
|
|
37
37
|
@password = nil
|
|
38
38
|
@clickElement = nil
|
|
39
|
+
@jsCode = nil
|
|
39
40
|
end
|
|
40
41
|
|
|
41
42
|
# @return [Boolean] true if the background of the web page should be included in the PDF
|
|
@@ -417,6 +418,19 @@ module GrabzIt
|
|
|
417
418
|
def password=(value)
|
|
418
419
|
@password = value
|
|
419
420
|
end
|
|
421
|
+
|
|
422
|
+
# @return [String] get the JavaScript code that will be execute in the web page before the capture is performed
|
|
423
|
+
def jsCode
|
|
424
|
+
@jsCode
|
|
425
|
+
end
|
|
426
|
+
|
|
427
|
+
# Set the JavaScript code that will be execute in the web page before the capture is performed
|
|
428
|
+
#
|
|
429
|
+
# @param value [String] the javascript to execute
|
|
430
|
+
# @return [void]
|
|
431
|
+
def jsCode=(value)
|
|
432
|
+
@jsCode = value
|
|
433
|
+
end
|
|
420
434
|
|
|
421
435
|
# Define a HTTP Post parameter and optionally value, this method can be called multiple times to add multiple parameters. Using this method will force
|
|
422
436
|
# GrabzIt to perform a HTTP post.
|
|
@@ -443,7 +457,7 @@ module GrabzIt
|
|
|
443
457
|
items.push(GrabzIt::Utility.nil_check(url))
|
|
444
458
|
end
|
|
445
459
|
|
|
446
|
-
items.push(GrabzIt::Utility.nil_check(callBackURL),GrabzIt::Utility.nil_check(@customId),GrabzIt::Utility.b_to_str(@includeBackground),@pagesize ,@orientation,GrabzIt::Utility.nil_check(@customWaterMarkId),GrabzIt::Utility.b_to_str(@includeLinks),GrabzIt::Utility.b_to_str(@includeOutline),GrabzIt::Utility.nil_check(@title),GrabzIt::Utility.nil_check(@coverURL),GrabzIt::Utility.nil_int_check(@marginTop),GrabzIt::Utility.nil_int_check(@marginLeft),GrabzIt::Utility.nil_int_check(@marginBottom),GrabzIt::Utility.nil_int_check(@marginRight),GrabzIt::Utility.nil_int_check(@delay),GrabzIt::Utility.nil_int_check(@requestAs),GrabzIt::Utility.nil_check(@country),GrabzIt::Utility.nil_int_check(@quality),GrabzIt::Utility.nil_check(@templateId),GrabzIt::Utility.nil_check(@hideElement),GrabzIt::Utility.nil_check(@targetElement),GrabzIt::Utility.nil_check(@exportURL),GrabzIt::Utility.nil_check(@waitForElement),GrabzIt::Utility.nil_check(@encryptionKey),GrabzIt::Utility.b_to_str(@noAds),GrabzIt::Utility.nil_check(@post),GrabzIt::Utility.nil_int_check(@browserWidth),GrabzIt::Utility.nil_int_check(@height),GrabzIt::Utility.nil_int_check(@width),GrabzIt::Utility.nil_check(@templateVariables),GrabzIt::Utility.nil_check(@proxy),GrabzIt::Utility.nil_check(@mergeId),GrabzIt::Utility.nil_check(@address),GrabzIt::Utility.b_to_str(@noCookieNotifications),GrabzIt::Utility.nil_check(@cssMediaType),GrabzIt::Utility.nil_check(@password),GrabzIt::Utility.nil_check(@clickElement))
|
|
460
|
+
items.push(GrabzIt::Utility.nil_check(callBackURL),GrabzIt::Utility.nil_check(@customId),GrabzIt::Utility.b_to_str(@includeBackground),@pagesize ,@orientation,GrabzIt::Utility.nil_check(@customWaterMarkId),GrabzIt::Utility.b_to_str(@includeLinks),GrabzIt::Utility.b_to_str(@includeOutline),GrabzIt::Utility.nil_check(@title),GrabzIt::Utility.nil_check(@coverURL),GrabzIt::Utility.nil_int_check(@marginTop),GrabzIt::Utility.nil_int_check(@marginLeft),GrabzIt::Utility.nil_int_check(@marginBottom),GrabzIt::Utility.nil_int_check(@marginRight),GrabzIt::Utility.nil_int_check(@delay),GrabzIt::Utility.nil_int_check(@requestAs),GrabzIt::Utility.nil_check(@country),GrabzIt::Utility.nil_int_check(@quality),GrabzIt::Utility.nil_check(@templateId),GrabzIt::Utility.nil_check(@hideElement),GrabzIt::Utility.nil_check(@targetElement),GrabzIt::Utility.nil_check(@exportURL),GrabzIt::Utility.nil_check(@waitForElement),GrabzIt::Utility.nil_check(@encryptionKey),GrabzIt::Utility.b_to_str(@noAds),GrabzIt::Utility.nil_check(@post),GrabzIt::Utility.nil_int_check(@browserWidth),GrabzIt::Utility.nil_int_check(@height),GrabzIt::Utility.nil_int_check(@width),GrabzIt::Utility.nil_check(@templateVariables),GrabzIt::Utility.nil_check(@proxy),GrabzIt::Utility.nil_check(@mergeId),GrabzIt::Utility.nil_check(@address),GrabzIt::Utility.b_to_str(@noCookieNotifications),GrabzIt::Utility.nil_check(@cssMediaType),GrabzIt::Utility.nil_check(@password),GrabzIt::Utility.nil_check(@clickElement),GrabzIt::Utility.nil_check(@jsCode))
|
|
447
461
|
|
|
448
462
|
return items.join("|")
|
|
449
463
|
end
|
|
@@ -482,7 +496,8 @@ module GrabzIt
|
|
|
482
496
|
params['media'] = GrabzIt::Utility.nil_check(@cssMediaType)
|
|
483
497
|
params['password'] = GrabzIt::Utility.nil_check(@password)
|
|
484
498
|
params['click'] = GrabzIt::Utility.nil_check(@clickElement)
|
|
485
|
-
|
|
499
|
+
params['jscode'] = GrabzIt::Utility.nil_check(@jsCode)
|
|
500
|
+
|
|
486
501
|
return params;
|
|
487
502
|
end
|
|
488
503
|
end
|
data/lib/grabzit/videooptions.rb
CHANGED
|
@@ -21,6 +21,7 @@ module GrabzIt
|
|
|
21
21
|
@start = 0
|
|
22
22
|
@duration = 10
|
|
23
23
|
@framesPerSecond = 0
|
|
24
|
+
@jsCode = nil
|
|
24
25
|
end
|
|
25
26
|
|
|
26
27
|
# @return [Integer] the width of the browser in pixels
|
|
@@ -204,6 +205,19 @@ module GrabzIt
|
|
|
204
205
|
def framesPerSecond=(value)
|
|
205
206
|
@framesPerSecond = value
|
|
206
207
|
end
|
|
208
|
+
|
|
209
|
+
# @return [String] get the JavaScript code that will be execute in the web page before the capture is performed
|
|
210
|
+
def jsCode
|
|
211
|
+
@jsCode
|
|
212
|
+
end
|
|
213
|
+
|
|
214
|
+
# Set the JavaScript code that will be execute in the web page before the capture is performed
|
|
215
|
+
#
|
|
216
|
+
# @param value [String] the javascript to execute
|
|
217
|
+
# @return [void]
|
|
218
|
+
def jsCode=(value)
|
|
219
|
+
@jsCode = value
|
|
220
|
+
end
|
|
207
221
|
|
|
208
222
|
# Define a HTTP Post parameter and optionally value, this method can be called multiple times to add multiple parameters. Using this method will force
|
|
209
223
|
# GrabzIt to perform a HTTP post.
|
|
@@ -242,7 +256,8 @@ module GrabzIt
|
|
|
242
256
|
GrabzIt::Utility.nil_float_check(@framesPerSecond),
|
|
243
257
|
GrabzIt::Utility.nil_int_check(@duration),
|
|
244
258
|
GrabzIt::Utility.nil_int_check(@width),
|
|
245
|
-
GrabzIt::Utility.nil_int_check(@height)
|
|
259
|
+
GrabzIt::Utility.nil_int_check(@height),
|
|
260
|
+
GrabzIt::Utility.nil_check(@jsCode))
|
|
246
261
|
|
|
247
262
|
return items.join("|")
|
|
248
263
|
end
|
|
@@ -265,7 +280,8 @@ module GrabzIt
|
|
|
265
280
|
params['duration'] = GrabzIt::Utility.nil_int_check(@duration)
|
|
266
281
|
params['width'] = GrabzIt::Utility.nil_int_check(@width)
|
|
267
282
|
params['height'] = GrabzIt::Utility.nil_int_check(@height)
|
|
268
|
-
|
|
283
|
+
params['jscode'] = GrabzIt::Utility.nil_check(@jsCode)
|
|
284
|
+
|
|
269
285
|
return params
|
|
270
286
|
end
|
|
271
287
|
end
|
metadata
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: grabzit
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 3.5.
|
|
4
|
+
version: 3.5.6
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- GrabzIt
|
|
8
|
-
autorequire:
|
|
9
8
|
bindir: bin
|
|
10
9
|
cert_chain: []
|
|
11
10
|
date: 2024-02-07 00:00:00.000000000 Z
|
|
@@ -58,7 +57,6 @@ homepage: https://grabz.it/api/ruby
|
|
|
58
57
|
licenses:
|
|
59
58
|
- MIT
|
|
60
59
|
metadata: {}
|
|
61
|
-
post_install_message:
|
|
62
60
|
rdoc_options: []
|
|
63
61
|
require_paths:
|
|
64
62
|
- lib
|
|
@@ -73,8 +71,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
73
71
|
- !ruby/object:Gem::Version
|
|
74
72
|
version: '0'
|
|
75
73
|
requirements: []
|
|
76
|
-
rubygems_version: 3.
|
|
77
|
-
signing_key:
|
|
74
|
+
rubygems_version: 3.6.7
|
|
78
75
|
specification_version: 4
|
|
79
76
|
summary: GrabzIt Ruby Client
|
|
80
77
|
test_files: []
|