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