stealth_browser_automation 1.1.6 → 1.1.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/browserfactory.rb +12 -5
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: be8057b06c9a41b1cd8da4865b2bddf03183504d
|
4
|
+
data.tar.gz: 78540ec7c5f6fc96e533db3fc945017713f0907d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8770b01b07d77366c6724c9d34ad193d0241a23de1e20f42ad1ef6fa07ca594ffd0604fe9fdf6724d60a99dd013709c4b61ab7f2d6a05060a78228f9bb30459f
|
7
|
+
data.tar.gz: 4d5585456eecda4c299bdfc23b5758737541e7987cc5d5193c7e4a2592cbb48abf131b6678c33cbd91bf6c8555392a210b1022e4cc1ec19aaa71a42628a57ced
|
data/lib/browserfactory.rb
CHANGED
@@ -397,11 +397,18 @@ module BlackStack
|
|
397
397
|
rescue
|
398
398
|
# nothing here
|
399
399
|
end
|
400
|
-
|
401
|
-
|
402
|
-
|
403
|
-
|
404
|
-
|
400
|
+
i = 0
|
401
|
+
max = 3
|
402
|
+
success = false
|
403
|
+
while i<max && !success
|
404
|
+
i+=1
|
405
|
+
url = "http://127.0.0.1:#{BlackStack::StealthBrowserAutomation::Multilogin::mla_local_port}/api/v1/profile/stop?profileId=#{@@profile_name}"
|
406
|
+
uri = URI.parse(url)
|
407
|
+
body = Net::HTTP.get(uri)
|
408
|
+
res = JSON.parse(body)
|
409
|
+
success = true if res['status'].to_s == 'OK'
|
410
|
+
end # while i<max
|
411
|
+
raise 'Error requesting Mimic to stop (tried #{i.to_s} times)' if !success
|
405
412
|
end
|
406
413
|
# reseteo las variables
|
407
414
|
@@browser = nil
|