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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/tg_send_duo.rb +8 -20
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9096ce2d1abddf1403a5517e0e6c40f9d3c22977d7675658662124937659d4c9
4
- data.tar.gz: 63524549b9b92c4ae86bd67c11e1054ebeb358d3d5064609cb06101f06d3661e
3
+ metadata.gz: 6a85d8b1174be5d7ccd0244161a9b2840f121a65d023b25114fb2309ac02c3b5
4
+ data.tar.gz: cae7182937383a73de9988bc80ca07da49027537d3a058bbc083bbe9d62fbf19
5
5
  SHA512:
6
- metadata.gz: 897ef9f3b0dcd1cebd0498721ebb987be6cce9512099232ef8cc4f3bd4fd2ebdf9ad17ee2b09489d0aaec35dbfaa724433cab121d4576e00b7e7982a118c1a53
7
- data.tar.gz: 0cb924a61972aab5e7a58d149ccc3f012a2f86f4c9a0623748f8c395282bc866e89ce17df6ee1e9ac9bd3c39d1666b75238adb8a05247e6f0418fb30ed4960f9
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
- #Selenium::WebDriver::Chrome::Service.driver_path = './chromedriver.exe'
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
- # :capabilities options를 배열로 전달
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: capabilities)
71
+ @driver = Selenium::WebDriver.for(:chrome, capabilities: options)
77
72
  end
78
73
  else
79
74
  begin
80
- #Selenium::WebDriver::Chrome::Service.driver_path = './chromedriver.exe'
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
- # :capabilities options를 배열로 전달
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
- #Selenium::WebDriver::Chrome::Service.driver_path = './chromedriver.exe'
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
- # :capabilities options를 배열로 전달
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: 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.32
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-09 00:00:00.000000000 Z
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