tg_send_duo 0.0.31 → 0.0.32
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/tg_send_duo.rb +20 -8
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9096ce2d1abddf1403a5517e0e6c40f9d3c22977d7675658662124937659d4c9
|
4
|
+
data.tar.gz: 63524549b9b92c4ae86bd67c11e1054ebeb358d3d5064609cb06101f06d3661e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 897ef9f3b0dcd1cebd0498721ebb987be6cce9512099232ef8cc4f3bd4fd2ebdf9ad17ee2b09489d0aaec35dbfaa724433cab121d4576e00b7e7982a118c1a53
|
7
|
+
data.tar.gz: 0cb924a61972aab5e7a58d149ccc3f012a2f86f4c9a0623748f8c395282bc866e89ce17df6ee1e9ac9bd3c39d1666b75238adb8a05247e6f0418fb30ed4960f9
|
data/lib/tg_send_duo.rb
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
require 'glimmer-dsl-libui'
|
2
2
|
require 'selenium-webdriver'
|
3
|
+
require 'webdrivers'
|
3
4
|
require 'nokogiri'
|
4
5
|
require 'http'
|
5
6
|
require 'json'
|
@@ -30,7 +31,7 @@ class Naver
|
|
30
31
|
FileUtils.mkdir_p(telegram_cookie_dir) unless File.exist?(telegram_cookie_dir)
|
31
32
|
if proxy == ''
|
32
33
|
begin
|
33
|
-
Selenium::WebDriver::Chrome::Service.driver_path = './chromedriver.exe'
|
34
|
+
#Selenium::WebDriver::Chrome::Service.driver_path = './chromedriver.exe'
|
34
35
|
options = Selenium::WebDriver::Chrome::Options.new
|
35
36
|
|
36
37
|
options.add_argument('--headless') # 브라우저 UI 없이 실행
|
@@ -46,7 +47,11 @@ class Naver
|
|
46
47
|
options.add_argument('user-data-dir=C:/telegram_cookie/' + telegram_number)
|
47
48
|
|
48
49
|
|
49
|
-
|
50
|
+
# :capabilities에 options를 배열로 전달
|
51
|
+
capabilities = [options]
|
52
|
+
|
53
|
+
# Selenium WebDriver에서 options를 capabilities로 전달
|
54
|
+
@driver = Selenium::WebDriver.for(:chrome, capabilities: capabilities)
|
50
55
|
|
51
56
|
|
52
57
|
|
@@ -68,11 +73,11 @@ class Naver
|
|
68
73
|
@driver.switch_to.window(first_window)
|
69
74
|
|
70
75
|
rescue
|
71
|
-
@driver = Selenium::WebDriver.for(:chrome, capabilities:
|
76
|
+
@driver = Selenium::WebDriver.for(:chrome, capabilities: capabilities)
|
72
77
|
end
|
73
78
|
else
|
74
79
|
begin
|
75
|
-
Selenium::WebDriver::Chrome::Service.driver_path = './chromedriver.exe'
|
80
|
+
#Selenium::WebDriver::Chrome::Service.driver_path = './chromedriver.exe'
|
76
81
|
options = Selenium::WebDriver::Chrome::Options.new
|
77
82
|
options.add_argument('--headless') # 브라우저 UI 없이 실행
|
78
83
|
options.add_argument('--disable-gpu') # GPU 가속을 비활성화 (헤드리스에서 필요할 수 있음)
|
@@ -85,12 +90,16 @@ class Naver
|
|
85
90
|
options.add_argument('--disable-notifications')
|
86
91
|
options.add_argument('--remote-debugging-port=9222')
|
87
92
|
options.add_argument('user-data-dir=C:/telegram_cookie/' + telegram_number)
|
88
|
-
|
93
|
+
# :capabilities에 options를 배열로 전달
|
94
|
+
capabilities = [options]
|
95
|
+
|
96
|
+
# Selenium WebDriver에서 options를 capabilities로 전달
|
97
|
+
@driver = Selenium::WebDriver.for(:chrome, capabilities: capabilities)
|
89
98
|
rescue => e
|
90
99
|
puts e
|
91
100
|
puts 'proxy error...'
|
92
101
|
begin
|
93
|
-
Selenium::WebDriver::Chrome::Service.driver_path = './chromedriver.exe'
|
102
|
+
#Selenium::WebDriver::Chrome::Service.driver_path = './chromedriver.exe'
|
94
103
|
options = Selenium::WebDriver::Chrome::Options.new
|
95
104
|
options.page_load_strategy = :normal
|
96
105
|
options.timeouts = {page_load: 20_000}
|
@@ -102,9 +111,12 @@ class Naver
|
|
102
111
|
options.add_argument('--disable-popup-blocking')
|
103
112
|
options.add_argument('--remote-debugging-port=9222')
|
104
113
|
options.add_argument('user-data-dir=C:/telegram_cookie/' + telegram_number)
|
105
|
-
|
114
|
+
# :capabilities에 options를 배열로 전달
|
115
|
+
capabilities = [options]
|
116
|
+
|
117
|
+
@driver = Selenium::WebDriver.for(:chrome, capabilities: capabilities)
|
106
118
|
rescue
|
107
|
-
@driver = Selenium::WebDriver.for(:chrome, capabilities:
|
119
|
+
@driver = Selenium::WebDriver.for(:chrome, capabilities: capabilities)
|
108
120
|
end
|
109
121
|
end
|
110
122
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tg_send_duo
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.32
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- zon
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2025-01-09 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: File to Clipboard gem
|
14
14
|
email: mymin26@naver.com
|