posting_duo 0.0.10 → 0.0.13

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/posting_duo.rb +40 -15
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 29556b1cf53a9bfb3a296bebacdf4ced224510c5842a422c55350231df0f26b2
4
- data.tar.gz: a559bc1924a89720aa90962abbc7a4cde4870dc83c991fbc61b9499e494728a6
3
+ metadata.gz: 0e9aac868e76854f511676f7baf7b12e515b0d0a827568cefe70ddeca76db1ee
4
+ data.tar.gz: 372415f9f141c6cecd74ce005aa93dbce43b837d2704781fc488a63ff100a464
5
5
  SHA512:
6
- metadata.gz: d4b82a607b64f1719af69e6dcc0d8910799e8b9625c89468ff0d162ccbe39a02c10d0de9f22795027d0b86560bd58781c9ca30d2d722f46d2f36b93e04a5a40a
7
- data.tar.gz: 060ac550fcbc630766781d833365e459015e27ee6119b095d69a427b5217e02b336491dd6896c8a9f577b7c3938e78c0419a6992085ff1ff01e32d6b471bde5b
6
+ metadata.gz: d4a438e1d87a1f39c77e13965ba5e99e332860c1be946c9b48d24733a5f73e29dd77f6e6c309b009077caeb238a0db60f849b417370e2f4dbe93448281ebb339
7
+ data.tar.gz: b2a63d4e39a6d8dc20e6676147e3456ea7b4cd7c67f307ec67913a4e6b7843396abfd4f7b28a00035a97145651ba7dcbe0a6675a3e6afa9b3d2a4d16bc1b8398
data/lib/posting_duo.rb CHANGED
@@ -42,7 +42,11 @@ class Naver
42
42
  options.timeouts = {page_load: 20_000}
43
43
  options.add_argument('--start-maximized')
44
44
  options.add_argument('user-agent=Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.6723.59 Safari/537.36') # user-agent 위조
45
-
45
+ # `capabilities` 사용
46
+ capabilities = [options]
47
+
48
+ # 드라이버 초기화 (capabilities 사용)
49
+ @driver = Selenium::WebDriver.for(:chrome, capabilities: capabilities)
46
50
  #options.add_argument('--disable-blink-features=AutomationControlled')
47
51
  #options.add_argument('--disable-popup-blocking')
48
52
  #options.add_argument('--dns-prefetch-disable')
@@ -59,9 +63,14 @@ class Naver
59
63
  #options.add_argument('--disable-translate')
60
64
  #options.add_argument('--disable-extensions-file-access-check')
61
65
  #options.add_argument('--disable-impl-side-painting')
62
- @driver = Selenium::WebDriver.for(:chrome, capabilities: options)
66
+ #@driver = Selenium::WebDriver.for(:chrome, capabilities: options)
63
67
  rescue
64
- @driver = Selenium::WebDriver.for(:chrome, capabilities: options)
68
+ #@driver = Selenium::WebDriver.for(:chrome, capabilities: options)
69
+ # `capabilities` 사용
70
+ capabilities = [options]
71
+
72
+ # 드라이버 초기화 (capabilities 사용)
73
+ @driver = Selenium::WebDriver.for(:chrome, capabilities: capabilities)
65
74
  end
66
75
  else
67
76
  begin
@@ -94,7 +103,12 @@ class Naver
94
103
  #options.add_argument('--disable-translate')
95
104
  #options.add_argument('--disable-extensions-file-access-check')
96
105
  #options.add_argument('--disable-impl-side-painting')
97
- @driver = Selenium::WebDriver.for(:chrome, capabilities: options)
106
+ #@driver = Selenium::WebDriver.for(:chrome, capabilities: options)
107
+ # `capabilities` 사용
108
+ capabilities = [options]
109
+
110
+ # 드라이버 초기화 (capabilities 사용)
111
+ @driver = Selenium::WebDriver.for(:chrome, capabilities: capabilities)
98
112
  rescue => e
99
113
  puts e
100
114
  puts 'proxy error...'
@@ -123,9 +137,19 @@ class Naver
123
137
  #options.add_argument('--disable-translate')
124
138
  #options.add_argument('--disable-extensions-file-access-check')
125
139
  #options.add_argument('--disable-impl-side-painting')
126
- @driver = Selenium::WebDriver.for(:chrome, capabilities: options)
140
+ #@driver = Selenium::WebDriver.for(:chrome, capabilities: options)
141
+ # `capabilities` 사용
142
+ capabilities = [options]
143
+
144
+ # 드라이버 초기화 (capabilities 사용)
145
+ @driver = Selenium::WebDriver.for(:chrome, capabilities: capabilities)
127
146
  rescue
128
- @driver = Selenium::WebDriver.for(:chrome, capabilities: options)
147
+ #@driver = Selenium::WebDriver.for(:chrome, capabilities: options)
148
+ # `capabilities` 사용
149
+ capabilities = [options]
150
+
151
+ # 드라이버 초기화 (capabilities 사용)
152
+ @driver = Selenium::WebDriver.for(:chrome, capabilities: capabilities)
129
153
  end
130
154
  end
131
155
  end
@@ -8193,6 +8217,15 @@ rescue
8193
8217
  sleep(5)
8194
8218
 
8195
8219
  rescue
8220
+ begin
8221
+ @driver.find_element(:xpath, '//*[@class="btn_blue btn_svc write"]').send_keys()
8222
+ sleep(2)
8223
+
8224
+ @driver.find_element(:xpath, '//*[@class="btn_blue btn_svc write"]').click
8225
+ puts '-[√] 등록을 24번 코드로 시도하였습니다.......'.magenta
8226
+ sleep(5)
8227
+
8228
+ rescue
8196
8229
  begin
8197
8230
  @driver.find_element(:xpath, '//*[@type="submit"]').send_keys()
8198
8231
  sleep(2)
@@ -8220,15 +8253,7 @@ rescue
8220
8253
  sleep(5)
8221
8254
 
8222
8255
  rescue
8223
- begin
8224
- @driver.find_element(:xpath, '//*[@class="btn_blue btn_svc write"]').send_keys()
8225
- sleep(2)
8226
-
8227
- @driver.find_element(:xpath, '//*[@class="btn_blue btn_svc write"]').click
8228
- puts '-[√] 등록을 24번 코드로 시도하였습니다.......'.magenta
8229
- sleep(5)
8230
-
8231
- rescue
8256
+
8232
8257
 
8233
8258
  ########─────────────────────────────▼▼▼▼▼▼▼ 등록버튼 2차 시도 ▼▼▼▼▼▼▼──────────────────────────────#######
8234
8259
  begin
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: posting_duo
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.10
4
+ version: 0.0.13
5
5
  platform: ruby
6
6
  authors:
7
7
  - zon
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-11-26 00:00:00.000000000 Z
11
+ date: 2024-01-03 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: File to Clipboard gem
14
14
  email: mymin26@naver.com