duo_blog_cafe_comment 0.0.72 → 0.0.75

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_blog_cafe_comment.rb +21 -10
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8d3bf0d2eb6e408281c837f61f2cda0c3827ec90e5ceefc042e36918af041c59
4
- data.tar.gz: 9bcb12ab26198da5fccb7f497816104494e395187230d0d844e3c0fd3a464e86
3
+ metadata.gz: cf7bc2d2e789ed5556242f75727eb8dba33110c63675682c1e521b22adf72403
4
+ data.tar.gz: 14640adbfb93b3bdfd00be71caeefd574f8df425f3b68b791819f8fd7898f5a4
5
5
  SHA512:
6
- metadata.gz: 66d8478518522d9df99c1325f56b580264889869d7b0059be74ac935f12d581b1fcf77f5ea57b6520b827143eeede6486024e66bfb7435db3d019f5e4224af92
7
- data.tar.gz: 0fdccee36b8bcc5df6d35fafa7a4a3febed8d4bb22c7e71bed3ac21b918c13e16aae5f21863ee5d7a33318e8714aaf093b807a7a1fcfb2a9dbc09519374b8e56
6
+ metadata.gz: a6ec35ba8f5df9e08dbffece8b48d9e568458e8ea2ca8d53c57e7a4a3ffa2c05d4515a194691af28fb58a78cadafa92181f5f7403a078052ec5bc5e96261eede
7
+ data.tar.gz: 2ca50e4ff61f527d69ee9d1cc35e87f80c06315f298ed9ba7e947fc4e396e3e82c360594e13e698b4435c5a8e74e30fe600aa11b4626fa4a1e1aaa9a854f789a
@@ -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|
@@ -247,7 +259,7 @@ class Naver
247
259
  end
248
260
  return 0
249
261
  @driver.quit
250
- end
262
+ end
251
263
 
252
264
  else
253
265
  # @driver.switch_to.default_content
@@ -415,15 +427,14 @@ class Naver
415
427
  end
416
428
 
417
429
  begin
418
- # 아이프레임 요소가 나타날 때까지 기다립니다.
419
- wait = Selenium::WebDriver::Wait.new(:timeout => 5)
420
- wait.until { @driver.find_element(:xpath, '//*[@class="FormInputCheck"]') }
421
- sleep(1)
422
- @driver.find_element(:xpath, '//*[@class="FormInputCheck"]').click
423
- sleep(2)
424
- rescue
425
-
426
- end
430
+ notic_elements = @driver.find_elements(:css, 'strong.board-tag-txt')
431
+ if notic_elements.any?
432
+ check_notic = @driver.find_elements(:xpath, '//*[@class="FormInputCheck"]')
433
+ check_notic.first.click if check_notic.any?
434
+ sleep(1.5)
435
+ end
436
+ rescue
437
+ end
427
438
 
428
439
  # 한 페이지에 게시글이 15개씩 있다고 가정
429
440
  articles_per_page = 15
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: duo_blog_cafe_comment
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.72
4
+ version: 0.0.75
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