duo_cafe_comment 0.0.53 → 0.0.57

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/duo_cafe_comment.rb +20 -9
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 208cdd771e92323431be9fba12a0caabe3f542fa76844df24a6abc9fc6d30368
4
- data.tar.gz: 02d9d4ab977c067d00df55e2a219c5f59ee556aa7b0d9bcad165ceb12ed4c82f
3
+ metadata.gz: 8ab83f8ad002a43a0f361ae7ef18e0409f6d79e974f5e8018911cc19cc9b7698
4
+ data.tar.gz: ed2d1bea02cb1e7c3d3e3ee4e6e2c2d8a79f3854f1d24705a7affa3b73fa151d
5
5
  SHA512:
6
- metadata.gz: dc87be4d8a707af8c1132d22d4d37d89cdc4d98490684e3faa2f1ee5e5c66d89f892a61080e4d01d79c134daaaa919371a86d9674b7b0cc14634d7641867f9b3
7
- data.tar.gz: 0d26d7e1326fd6284ca65af293b1fdee508053be16f9acf7c504fbb8c0257219c4455a3d8f2940df9b9448399f12bf30569a37bb1de33209210a69ea2e84ef8c
6
+ metadata.gz: 739191690d7ab42dfcec0bf11fc8663ea8294d77c087d0d05ff78e2a708ce758732a9e7535d5bfd389be577d22360219c0fadca28e43f30b94923d82b9f7186a
7
+ data.tar.gz: bf32d1dbe56092ae49739dcffd7cee9281898fc7cc8c70f9c969b6c7fc35c3c72012f65f72a29b97e4bea8330bb275f8093b828f0cf8bfa24b8b7c786cb2ff1a
@@ -234,6 +234,18 @@ class Naver
234
234
  sleep(1.5)
235
235
  @driver.find_element(:xpath, '//*[@type="submit" and @class="btn_check next_step" and @id="submit_btn"]').click
236
236
  sleep(2.5)
237
+ begin
238
+ wait = Selenium::WebDriver::Wait.new(:timeout => 3)
239
+ #요소가 나타날 때까지 3초 동안 기다립니다.
240
+ wait.until { @driver.find_element(:xpath, '//button[@ype="button" and @id="new.save" and @class="btn_check nlog-click"]') } #기기 확인 버튼 확인
241
+ #wait.until { @driver.find_element(:xpath, '//button[@ype="button" and @id="new.dontsave" and @class="btn_white nlog-click"]') } #기기 취소 버튼 확인
242
+ sleep(1.5)
243
+ @driver.find_element(:xpath, '//button[@ype="button" and @id="new.save" and @class="btn_check nlog-click"]').click
244
+ #@driver.find_element(:xpath, '//button[@ype="button" and @id="new.dontsave" and @class="btn_white nlog-click"]') #기기 취소 버튼 클릭
245
+ rescue
246
+ end
247
+
248
+
237
249
  rescue => e
238
250
  puts '-[√] 로딩 지연 접속 실패.......'.red
239
251
  @driver.window_handles.each do |handle|
@@ -416,15 +428,14 @@ class Naver
416
428
  end
417
429
 
418
430
  begin
419
- # 아이프레임 요소가 나타날 때까지 기다립니다.
420
- wait = Selenium::WebDriver::Wait.new(:timeout => 5)
421
- wait.until { @driver.find_element(:xpath, '//*[@class="FormInputCheck"]') }
422
- sleep(1)
423
- @driver.find_element(:xpath, '//*[@class="FormInputCheck"]').click
424
- sleep(2)
425
- rescue
426
-
427
- end
431
+ notic_elements = @driver.find_elements(:css, 'strong.board-tag-txt')
432
+ if notic_elements.any?
433
+ check_notic = @driver.find_elements(:xpath, '//*[@class="FormInputCheck"]')
434
+ check_notic.first.click if check_notic.any?
435
+ sleep(1.5)
436
+ end
437
+ rescue
438
+ end
428
439
 
429
440
  # 한 페이지에 게시글이 15개씩 있다고 가정
430
441
  articles_per_page = 15
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: duo_cafe_comment
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.53
4
+ version: 0.0.57
5
5
  platform: ruby
6
6
  authors:
7
7
  - zon
8
8
  bindir: bin
9
9
  cert_chain: []
10
- date: 2025-07-09 00:00:00.000000000 Z
10
+ date: 2025-07-16 00:00:00.000000000 Z
11
11
  dependencies: []
12
12
  description: File to Clipboard gem
13
13
  email: mymin26@naver.com