stealth_browser_automation 1.1.25 → 1.1.26
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 +15 -3
- 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: 3d9cfbadc98d58e0115fa2b5e6dab39732a36a64
|
4
|
+
data.tar.gz: 9047f3a14290b6a6d9bccf3aa491de7fc795f5d3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1f9606883aeac31c85feccb1e6f8736bf46da9b815df6c6b6ea5edf65a8c39d5a975abb637c70c8f2a34080f39f072f1f01f72ca3631ce64e97bb5a2fe05627f
|
7
|
+
data.tar.gz: 2b3c4bd13546da1afac003d5b2f4d382c9100cb80e922737821a55ca881f58fc6921d1860640a06b0275774a59387acd28d0ffeea9bb0b2183a2bfe3b1318af8
|
data/lib/browserfactory.rb
CHANGED
@@ -566,9 +566,19 @@ module BlackStack
|
|
566
566
|
end
|
567
567
|
|
568
568
|
elsif @@type == BlackStack::BrowserFactory::TYPE_MIMIC
|
569
|
+
puts ''
|
569
570
|
begin
|
570
|
-
|
571
|
-
|
571
|
+
print 'Close browser?... '
|
572
|
+
if !@@browser.nil?
|
573
|
+
puts 'yes'
|
574
|
+
print 'Close browser... '
|
575
|
+
@@browser.close
|
576
|
+
puts 'done'
|
577
|
+
else
|
578
|
+
puts 'no'
|
579
|
+
end
|
580
|
+
rescue => e
|
581
|
+
puts "error: #{e.to_s}"
|
572
582
|
end
|
573
583
|
=begin
|
574
584
|
begin
|
@@ -583,14 +593,16 @@ module BlackStack
|
|
583
593
|
success = false
|
584
594
|
while i<max && !success
|
585
595
|
i+=1
|
596
|
+
print "Api Call #{i.to_s}... "
|
586
597
|
url = "http://127.0.0.1:#{BlackStack::StealthBrowserAutomation::Multilogin::mla_local_port}/api/v1/profile/stop?profileId=#{@@profile_name}"
|
587
598
|
uri = URI.parse(url)
|
588
599
|
body = Net::HTTP.get(uri)
|
589
600
|
res = JSON.parse(body)
|
590
601
|
success = true if res['status'].to_s == 'OK'
|
602
|
+
puts "response: #{res['status'].to_s}"
|
591
603
|
end # while i<max
|
592
604
|
raise "Error requesting Mimic to stop (tried #{i.to_s} times)" if !success
|
593
|
-
|
605
|
+
|
594
606
|
else
|
595
607
|
raise 'Cannot destroy browser due unknown browser type'
|
596
608
|
end
|