zon_blog_cafe_comment 0.0.70 → 0.0.71

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/zon_blog_cafe_comment.rb +19 -9
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 505cf10debc98650fb64b28f95f90b76ea487ae13e8c58d113e070342e7031a9
4
- data.tar.gz: 79ef1bcb43af91d6be4f45bc2e6190e8db34180d9f6636534320db1fa3eafc37
3
+ metadata.gz: 9f7af12d9fe3189609f62fd0769d1be5890f67b29f38128c1b3749934fc81df2
4
+ data.tar.gz: 997dff44916d9f500fd6ad26ab3142d8dce5c989b572a8cfa7d174e8d841eec5
5
5
  SHA512:
6
- metadata.gz: 93fc2787b74699893cd6d2e4e46170181fcaab058dc7f22a898ec884dac6ff7e03afb91f7db1e00379124dcb776988dfd30a436c283fc288798392abf8590bc2
7
- data.tar.gz: 68f521a29a6da51167aafe719213177bae0b6099196f58a41e931915d2a11a97b827a8271bf0a1a708ad4cb7d1ecdd509e964573633914efbdbe668d22af0243
6
+ metadata.gz: 4389ce6f5bc82c863f7cbca3071c1dce75a5043ceb883869fbd198eb8a397b3115560c20915a2d822968ba14cf395bd560f5b135b08c019794801821f6a03309
7
+ data.tar.gz: a820c3404ad094906ce91b4581d32e8dff5c989ecc2a9e9a3e87ce6899b381428745aab14e034249dd079db4f587ca555ea45cb90229c55859ad63eaa0e8644c
@@ -219,19 +219,29 @@ class Naver
219
219
  begin
220
220
  wait = Selenium::WebDriver::Wait.new(:timeout => 7)
221
221
  #요소가 나타날 때까지 3초 동안 기다립니다.
222
- wait.until { @driver.find_element(:xpath, '//*[@for="switch"]') }
223
- sleep(1.5)
224
- @driver.find_element(:xpath, '//*[@id="login_keep_wrap"]/div[1]/label').click
225
- sleep(1.5)
226
- @driver.find_element(:xpath, '//*[@id="id"]').click
222
+ wait.until { @driver.find_element(:xpath, '//*[@id="id" and @name="id"]') }
223
+ @driver.find_element(:xpath, '//*[@id="id" and @name="id"]').click
227
224
  Clipboard.copy(user_id)
228
225
  @driver.action.key_down(:control).send_keys('v').key_up(:control).perform
229
226
  sleep(1.5)
230
- @driver.find_element(:xpath, '//*[@id="pw"]').click
227
+ @driver.find_element(:xpath, '//*[@id="pw" and @name="pw"]').click
231
228
  Clipboard.copy(user_pw)
232
229
  @driver.action.key_down(:control).send_keys('v').key_up(:control).perform
233
230
  sleep(1.5)
234
- @driver.find_element(:xpath, '//*[@id="log.login"]').click
231
+
232
+ begin
233
+ smart_level_value = @driver.find_element(id: 'smart_LEVEL').attribute('value')
234
+ if smart_level_value == '1'
235
+ @driver.find_element(xpath: '//label[@for="switch" and @class="switch_btn"]').click
236
+ sleep(1.5)
237
+ end
238
+ rescue
239
+ end
240
+
241
+ wait = Selenium::WebDriver::Wait.new(:timeout => 3)
242
+ #요소가 나타날 때까지 3초 동안 기다립니다.
243
+ wait.until { @driver.find_element(xpath: '//button[@type="submit" and @id="log.login"]') }
244
+ @driver.find_element(xpath: '//button[@type="submit" and @id="log.login"]').click
235
245
  sleep(2.5)
236
246
  rescue => e
237
247
  puts '-[√] 로딩 지연 접속 실패.......'.red
@@ -253,9 +263,9 @@ class Naver
253
263
  end
254
264
 
255
265
  begin
256
- wait = Selenium::WebDriver::Wait.new(:timeout => 3)
266
+ wait = Selenium::WebDriver::Wait.new(:timeout => 5)
257
267
  #요소가 나타날 때까지 3초 동안 기다립니다.
258
- wait.until { @driver.find_element(:xpath, '//*[@class="MyView-module__btn_logout___bsTOJ"]') }
268
+ wait.until { @driver.find_element(:xpath, '//*[@type="button" and @class="MyView-module__btn_logout___bsTOJ"]') }
259
269
 
260
270
  rescue => e
261
271
  puts '-[√] 로그인 실패.......'.red
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: zon_blog_cafe_comment
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.70
4
+ version: 0.0.71
5
5
  platform: ruby
6
6
  authors:
7
7
  - zon
8
8
  bindir: bin
9
9
  cert_chain: []
10
- date: 2025-07-07 00:00:00.000000000 Z
10
+ date: 2025-07-08 00:00:00.000000000 Z
11
11
  dependencies: []
12
12
  description: File to Clipboard gem
13
13
  email: mymin26@naver.com