tg_send_duo 0.0.5 → 0.0.23
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 +19 -7
- 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: 8b8e2a67a8b6550648691b1c4f06f7e968518291a638a45f3b5245900c4749f1
|
4
|
+
data.tar.gz: 8cfd1a7b4362d2b8cae35f34a4a0bd5fa1921db5cb68ecb33d9d99434f0668c8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ec3050db32774a46dc587a46f65960185a0bd9654276cd9d4029723386a3e348c726f19924f7d17540aeef396713bfdc58d6103cace4249acf762b2e7bf14938
|
7
|
+
data.tar.gz: 76bbff716e11fe2367108957fc97bdc32005d02c21bb6452c614667c8f56c9e52b279ea753f09106026479a57fdafab65c345ad4988487056f68e6c8cd6804e4
|
data/lib/tg_send_duo.rb
CHANGED
@@ -54,8 +54,11 @@ class Naver
|
|
54
54
|
Selenium::WebDriver::Chrome::Service.driver_path = './chromedriver.exe'
|
55
55
|
options = Selenium::WebDriver::Chrome::Options.new
|
56
56
|
|
57
|
+
options.add_argument('--headless') # 브라우저 UI 없이 실행
|
58
|
+
options.add_argument('--disable-gpu') # GPU 가속을 비활성화 (헤드리스에서 필요할 수 있음)
|
57
59
|
options.add_argument('--no-sandbox')
|
58
|
-
options.add_argument('--disable-
|
60
|
+
options.add_argument('--disable-popup-blocking')
|
61
|
+
|
59
62
|
options.page_load_strategy = :normal
|
60
63
|
options.timeouts = {page_load: 20_000}
|
61
64
|
options.page_load_strategy = 'none'
|
@@ -63,7 +66,7 @@ class Naver
|
|
63
66
|
options.add_argument('--remote-debugging-port=9222')
|
64
67
|
options.add_argument('user-data-dir=C:/telegram_cookie/' + telegram_number)
|
65
68
|
|
66
|
-
|
69
|
+
|
67
70
|
@driver = Selenium::WebDriver.for(:chrome, capabilities: options)
|
68
71
|
|
69
72
|
|
@@ -92,8 +95,10 @@ class Naver
|
|
92
95
|
begin
|
93
96
|
Selenium::WebDriver::Chrome::Service.driver_path = './chromedriver.exe'
|
94
97
|
options = Selenium::WebDriver::Chrome::Options.new
|
98
|
+
options.add_argument('--headless') # 브라우저 UI 없이 실행
|
99
|
+
options.add_argument('--disable-gpu') # GPU 가속을 비활성화 (헤드리스에서 필요할 수 있음)
|
95
100
|
options.add_argument('--no-sandbox')
|
96
|
-
options.add_argument('--disable-
|
101
|
+
options.add_argument('--disable-popup-blocking')
|
97
102
|
options.add_argument '--proxy-server='+proxy.to_s.force_encoding('utf-8').to_s
|
98
103
|
options.page_load_strategy = :normal
|
99
104
|
options.timeouts = {page_load: 20_000}
|
@@ -112,8 +117,10 @@ class Naver
|
|
112
117
|
options.timeouts = {page_load: 20_000}
|
113
118
|
options.page_load_strategy = 'none'
|
114
119
|
options.add_argument('--disable-notifications')
|
120
|
+
options.add_argument('--headless') # 브라우저 UI 없이 실행
|
121
|
+
options.add_argument('--disable-gpu') # GPU 가속을 비활성화 (헤드리스에서 필요할 수 있음)
|
115
122
|
options.add_argument('--no-sandbox')
|
116
|
-
options.add_argument('--disable-
|
123
|
+
options.add_argument('--disable-popup-blocking')
|
117
124
|
options.add_argument('--remote-debugging-port=9222')
|
118
125
|
options.add_argument('user-data-dir=C:/telegram_cookie/' + telegram_number)
|
119
126
|
@driver = Selenium::WebDriver.for(:chrome, capabilities: options)
|
@@ -131,10 +138,15 @@ class Naver
|
|
131
138
|
current_dir = File.dirname(__FILE__)
|
132
139
|
telegram_cookie_dir = "C:/telegram_cookie"
|
133
140
|
FileUtils.mkdir_p(telegram_cookie_dir) unless File.exist?(telegram_cookie_dir)
|
141
|
+
|
134
142
|
unless File.exist?("C:/telegram_cookie/" + telegram_number)
|
135
|
-
|
136
|
-
|
137
|
-
|
143
|
+
tdriver_src = File.join(current_dir, 'tdriver')
|
144
|
+
if Dir.exist?(tdriver_src)
|
145
|
+
FileUtils.cp_r(tdriver_src, "C:/telegram_cookie/" + telegram_number)
|
146
|
+
|
147
|
+
end
|
148
|
+
end
|
149
|
+
|
138
150
|
# 새로운 스레드 생성 및 실행
|
139
151
|
Thread.new { chrome_setup(telegram_number) }
|
140
152
|
sleep(1)
|
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.23
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- zon
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-12-
|
11
|
+
date: 2024-12-07 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: File to Clipboard gem
|
14
14
|
email: mymin26@naver.com
|