stealth_browser_automation 1.1.30 → 1.1.31
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/browserfactory.rb +7 -7
- 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: d082fe944c4ad48a19be6254853441e85f64a41c
|
4
|
+
data.tar.gz: 4961762eedb988c6c36c3c991f187f413a174c1a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 762a6bd971516651623fb84dc66b3b2f6f744f7c8c5ab61132267b23221af1870536d5b7479442d686418af47e79eea734b10fdd16140531df7f58146506eb3f
|
7
|
+
data.tar.gz: 3dd168f43758e6b0b1fc04497e2140ec9422657c104388c58ccc9e2efa9d280504cbef3182b91edbb894a372ca608d9250fb830a2c0d1482edddb28cd5584323
|
data/lib/browserfactory.rb
CHANGED
@@ -604,20 +604,20 @@ puts 'no'
|
|
604
604
|
=end
|
605
605
|
|
606
606
|
i = 0
|
607
|
-
max =
|
608
|
-
success =
|
609
|
-
|
607
|
+
max = 6
|
608
|
+
success = 0
|
609
|
+
max_success_required = 2
|
610
|
+
while i<max && success<max_success_required
|
610
611
|
i+=1
|
611
612
|
url = "http://127.0.0.1:#{BlackStack::StealthBrowserAutomation::Multilogin::mla_local_port}/api/v1/profile/stop?profileId=#{@@profile_name}"
|
612
613
|
print "Api Call ##{i.to_s} to: #{url}... "
|
613
|
-
sleep(50000)
|
614
614
|
uri = URI.parse(url)
|
615
615
|
body = Net::HTTP.get(uri)
|
616
616
|
res = JSON.parse(body)
|
617
|
-
success
|
617
|
+
success += 1 if res['status'].to_s == 'OK'
|
618
618
|
puts "response: #{res['status'].to_s}"
|
619
|
-
end # while i<max
|
620
|
-
raise "Error requesting Mimic to stop (tried #{i.to_s} times)" if
|
619
|
+
end # while i<max && && success<max_success_required
|
620
|
+
raise "Error requesting Mimic to stop (tried #{i.to_s} times)" if success<max_success_required
|
621
621
|
|
622
622
|
else
|
623
623
|
raise 'Cannot destroy browser due unknown browser type'
|