posting_zon 3.111.009 → 3.111.010

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_zon.rb +158 -30
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d97831616e7ec907b3436b8c83190a6a4926831a1b25d726252a24dd2782b4d3
4
- data.tar.gz: 8675c35303597bf8660dd694859a2c0172eef25d3ba60e441b30f100077caf5e
3
+ metadata.gz: 73154fba9b419381dedaf9ded5eb32ed6054e60db1997f27714386b408a08324
4
+ data.tar.gz: ee4f919f5d89ded124c77184a32bd5970d4ff7c0ac525d60295c672e70df58bc
5
5
  SHA512:
6
- metadata.gz: 4d86c7aeaaa15657abcaed690e7dda718cc3f3543c4aaec1dc698b7efdebd1bb67d3de04efa3f9b6b7d4313e4148ec46ed5217d789ac3b1c4652b8f11bb35bf2
7
- data.tar.gz: 675574b6d37dcb59ee4cf13994767a68b6ff86f0d9d9b0055a1cb7f650b0aba5c51bf95be0305986498687a5a4faaf5fc18aab822f6a88827666298afaccc2a1
6
+ metadata.gz: a47ddade45a6e64710d12c672572aadedf931653c2bbbe2934df1b6387f2ecb205b95c9b6bb6d26e821374e09a71a081b686b946ab88c5d2cfef2dc77aedc613
7
+ data.tar.gz: 54f814fbddda272c5db6907164de31099fbcac874d2d3bcf29e65e295277b8075a15b4a856261a4c7443bad33f452dcd53eca3d2035b5462c87fc5ad6e1f0edf
data/lib/posting_zon.rb CHANGED
@@ -5585,8 +5585,17 @@ post_url = option['post_url'].to_s
5585
5585
  puts '-[√] 글쓰기 버튼 클릭 확인 code 5 타겟.......'.green
5586
5586
  sleep(3.7)
5587
5587
  rescue
5588
+ begin
5589
+ el_post_btn = @driver.find_element(css: 'img[src*="btn_write.gif"][alt="글쓰기"]')
5590
+ @driver.execute_script("arguments[0].scrollIntoView({block: 'center', inline: 'center'})", el_post_btn)
5591
+ sleep(1)
5592
+ @driver.find_element(css: 'img[src*="btn_write.gif"][alt="글쓰기"]').click
5593
+ puts '-[√] 글쓰기 버튼 클릭 확인 code 6 타겟.......'.green
5594
+ sleep(3.7)
5595
+ rescue
5588
5596
 
5589
5597
  end
5598
+ end
5590
5599
  end
5591
5600
  end
5592
5601
  end
@@ -6881,7 +6890,13 @@ begin
6881
6890
  sleep(1)
6882
6891
  puts '-[√] 닉네임 26코드 타겟.......'.yellow
6883
6892
  rescue
6884
-
6893
+ begin
6894
+ @driver.find_element(xpath: '//input[@type="text" and @title="글쓴이"]').send_keys(user_id)
6895
+ sleep(1)
6896
+ puts '-[√] 닉네임 27코드 타겟.......'.yellow
6897
+ rescue
6898
+
6899
+ end
6885
6900
  end
6886
6901
  end
6887
6902
  end
@@ -8314,34 +8329,44 @@ end
8314
8329
  rescue
8315
8330
  begin
8316
8331
  @driver.switch_to.default_content
8317
- if target_element
8318
- # 3. 제목 요소 바로 아래에 체크박스 HTML 삽입
8319
- checkbox_html = <<~HTML
8320
- <div class="custom-control custom-checkbox custom-control-inline">
8321
- <input type="checkbox" name="html" value="html2" id="html" onclick="html_auto_br(this);" class="custom-control-input">
8322
- <label class="custom-control-label" for="html"><span>HTML</span></label>
8323
- </div>
8324
- HTML
8325
- @driver.execute_script("arguments[0].insertAdjacentHTML('afterend', arguments[1]);", target_element, checkbox_html)
8326
- puts '체크박스 HTML 강제 적용.......'.green
8327
- sleep(1)
8328
-
8329
- # 4. 삽입한 체크박스 스크롤하여 화면 중앙으로 이동
8330
- html_checkbox = @driver.find_element(:xpath, '//*[@type="checkbox" and @name="html"]')
8331
- @driver.execute_script("arguments[0].scrollIntoView({block: 'center', inline: 'center'})", html_checkbox)
8332
+ html_bb = @driver.find_element(xpath: '//a[@href="#htmlEditor" and contains(@onclick, "html")]')
8333
+ @driver.execute_script("arguments[0].scrollIntoView({block: 'center', inline: 'center'})", html_bb)
8334
+ sleep(1)
8335
+ html_bb = @driver.find_element(xpath: '//a[@href="#htmlEditor" and contains(@onclick, "html")]').click
8336
+ puts '-[√] HTML 코드 34 code.......'.yellow
8332
8337
  sleep(1)
8333
-
8334
- # 5. HTML 토글 버튼 클릭
8335
- @driver.find_element(:xpath, '//*[@type="checkbox" and @name="html"]').click
8336
- puts '-[√] 임의 추가 HTML 코드 01 code.......'.yellow
8337
- sleep(1)
8338
-
8339
- else
8340
- puts "타겟 제목 요소가 없어서 체크박스 삽입 불가".red
8341
- end
8342
8338
  rescue
8343
-
8344
- end
8339
+ begin
8340
+ @driver.switch_to.default_content
8341
+ if target_element
8342
+ # 3. 제목 요소 바로 아래에 체크박스 HTML 삽입
8343
+ checkbox_html = <<~HTML
8344
+ <div class="custom-control custom-checkbox custom-control-inline">
8345
+ <input type="checkbox" name="html" value="html2" id="html" onclick="html_auto_br(this);" class="custom-control-input">
8346
+ <label class="custom-control-label" for="html"><span>HTML</span></label>
8347
+ </div>
8348
+ HTML
8349
+ @driver.execute_script("arguments[0].insertAdjacentHTML('afterend', arguments[1]);", target_element, checkbox_html)
8350
+ puts '체크박스 HTML 강제 적용.......'.green
8351
+ sleep(1)
8352
+
8353
+ # 4. 삽입한 체크박스 스크롤하여 화면 중앙으로 이동
8354
+ html_checkbox = @driver.find_element(:xpath, '//*[@type="checkbox" and @name="html"]')
8355
+ @driver.execute_script("arguments[0].scrollIntoView({block: 'center', inline: 'center'})", html_checkbox)
8356
+ sleep(1)
8357
+
8358
+ # 5. HTML 토글 버튼 클릭
8359
+ @driver.find_element(:xpath, '//*[@type="checkbox" and @name="html"]').click
8360
+ puts '-[√] 임의 추가 HTML 코드 01 code.......'.yellow
8361
+ sleep(1)
8362
+
8363
+ else
8364
+ puts "타겟 제목 요소가 없어서 체크박스 삽입 불가".red
8365
+ end
8366
+ rescue
8367
+
8368
+ end
8369
+ end
8345
8370
  end
8346
8371
  end
8347
8372
  end
@@ -8704,12 +8729,16 @@ begin
8704
8729
  puts '내용 항목 코드 타겟 53.......'.red
8705
8730
  rescue
8706
8731
  begin
8732
+ @driver.find_element(xpath: '//textarea[@id="editor_textarea_1" and contains(@class, "htmlEditor")]').click
8733
+ puts '내용 항목 코드 타겟 54.......'.red
8734
+ rescue
8735
+ begin
8707
8736
  # 1. 첫 번째 iframe (id="namoIframe0") 진입
8708
8737
  @driver.switch_to.frame(@driver.find_element(:id, 'namoIframe0'))
8709
8738
  # 2. 두 번째 iframe (id="NamoSE_Ifr__namo0") 진입
8710
8739
  @driver.switch_to.frame(@driver.find_element(:id, 'NamoSE_Ifr__namo0'))
8711
8740
  @driver.find_element(id: 'NamoSE_editorshtml_namo0').click
8712
- puts '내용 항목 코드 타겟 54.......'.red
8741
+ puts '내용 항목 코드 타겟 55.......'.red
8713
8742
  @driver.switch_to.default_content
8714
8743
  rescue
8715
8744
  end
@@ -8766,6 +8795,7 @@ end
8766
8795
  end
8767
8796
  end
8768
8797
  end
8798
+ end
8769
8799
 
8770
8800
 
8771
8801
  end
@@ -10427,7 +10457,29 @@ if check_captcha == 0
10427
10457
  #아이프레임 나오기
10428
10458
  @driver.switch_to.default_content()
10429
10459
  rescue
10430
-
10460
+ begin
10461
+ @driver.switch_to.default_content()
10462
+ el = @driver.find_element(xpath: '//a[@id="captcha" and contains(@href, "captcha.aspx")]')
10463
+ puts '-[√] 캡챠 발견!! 캡차 해제를 위한 환경설정 약 10초 소요.......'.red
10464
+ puts '-[√] 캡챠 해제 중~ 해제 완료까지 마우스 움직이지 마세요.......'.red
10465
+ puts '-[√] 캡챠 코드 code 20.......'.red
10466
+ sleep(1)
10467
+ @driver.execute_script("arguments[0].scrollIntoView({behavior: 'smooth', block: 'center', inline: 'center'});", el) # 화면 가운데
10468
+ sleep(1)
10469
+ mouse_move_percentage(0.3,0.02)
10470
+ sleep(0.5)
10471
+ left_click
10472
+ sleep(1)
10473
+ #@driver.switch_to.window(@driver.window_handle) #핸들 주입
10474
+ @driver.action.context_click(el).perform #우 클릭
10475
+ sleep(1)
10476
+ @driver.action.key_down(:shift).key_stroke('m').key_up(:shift).perform #단축키
10477
+ sleep(1)
10478
+ puts '-[√] 캡챠 코드 타겟 완료1.......'.blue
10479
+
10480
+ rescue
10481
+
10482
+ end
10431
10483
  end
10432
10484
  end
10433
10485
  end
@@ -11556,7 +11608,49 @@ if check_captcha == 0
11556
11608
  puts '-[√] 캡챠 해제 가능 유무 확인.......'.green
11557
11609
  sleep(1)
11558
11610
  rescue
11559
-
11611
+ begin
11612
+
11613
+ @driver.find_element(xpath: '//input[@title="스팸방지필터"]').click
11614
+ sleep(1)
11615
+ el2 = @driver.find_element(xpath: '//input[@title="스팸방지필터"]')
11616
+ @driver.action.context_click(el2).perform
11617
+
11618
+ sleep(1)
11619
+ @driver.action.key_stroke('up')
11620
+ sleep(1)
11621
+ @driver.action.key_stroke('up')
11622
+ sleep(1)
11623
+ @driver.action.key_stroke('enter')
11624
+ sleep(1)
11625
+ begin
11626
+ # 요소 찾기 타임아웃을 7초로 설정
11627
+ wait = Selenium::WebDriver::Wait.new(:timeout => 7)
11628
+ #요소가 나타날 때까지 7초 동안 기다립니다.
11629
+ wait.until { @driver.find_element(:xpath, '//*[@class="captcha-solver captcha-solver_inner"]') }
11630
+ rescue
11631
+ sleep(1)
11632
+ @driver.action.key_stroke('left')
11633
+ sleep(1)
11634
+ @driver.action.key_stroke('up')
11635
+ sleep(1)
11636
+ @driver.action.key_stroke('enter')
11637
+ sleep(1)
11638
+ # 요소 찾기 타임아웃을 7초로 설정
11639
+ wait = Selenium::WebDriver::Wait.new(:timeout => 7)
11640
+ #요소가 나타날 때까지 7초 동안 기다립니다.
11641
+ wait.until { @driver.find_element(:xpath, '//*[@class="captcha-solver captcha-solver_inner"]') }
11642
+ end
11643
+ puts '-[√] 캡챠 코드 타겟 완료2.......'.blue
11644
+
11645
+ puts '-[√] 캡챠 해제 가능 유무 확인.......'.green
11646
+ sleep(2)
11647
+ puts '-[√] 캡챠 해제 가능 유무 확인.......'.green
11648
+ sleep(2)
11649
+ puts '-[√] 캡챠 해제 가능 유무 확인.......'.green
11650
+ sleep(1)
11651
+ rescue
11652
+
11653
+ end
11560
11654
  end
11561
11655
  end
11562
11656
  end
@@ -12256,6 +12350,37 @@ ss_button = @driver.find_element(:xpath, "//a[@onclick='spamChkForm()' and norma
12256
12350
  puts '-[√] 등록을 49번 코드로 시도하였습니다.......'.magenta
12257
12351
  sleep(1)
12258
12352
 
12353
+ rescue
12354
+ begin
12355
+ ss_button = @driver.find_element(xpath: "//img[@src='images/confirm.gif']")
12356
+ @driver.execute_script("arguments[0].scrollIntoView({block: 'center', inline: 'center'})", ss_button)
12357
+ sleep(1)
12358
+
12359
+ ss_button = @driver.find_element(xpath: "//img[@src='images/confirm.gif']").click
12360
+ puts '-[√] 등록을 50번 코드로 시도하였습니다.......'.magenta
12361
+ sleep(1)
12362
+
12363
+ rescue
12364
+ begin
12365
+ ss_button = @driver.find_element(css: 'img[src*="btn_ok.gif"][alt="확인"]')
12366
+ @driver.execute_script("arguments[0].scrollIntoView({block: 'center', inline: 'center'})", ss_button)
12367
+ sleep(1)
12368
+
12369
+ ss_button = @driver.find_element(css: 'img[src*="btn_ok.gif"][alt="확인"]').click
12370
+ puts '-[√] 등록을 51번 코드로 시도하였습니다.......'.magenta
12371
+ sleep(1)
12372
+
12373
+ rescue
12374
+ begin
12375
+ ss_button = @driver.find_element(xpath: '//span[@class="button"]/input[@type="submit" and @value="저장하기"]')
12376
+ @driver.execute_script("arguments[0].scrollIntoView({block: 'center', inline: 'center'})", ss_button)
12377
+ sleep(1)
12378
+
12379
+ ss_button = @driver.find_element(xpath: '//span[@class="button"]/input[@type="submit" and @value="저장하기"]').click
12380
+ puts '-[√] 등록을 52번 코드로 시도하였습니다.......'.magenta
12381
+ sleep(1)
12382
+
12383
+
12259
12384
  rescue
12260
12385
  ########─────────────────────────────▼▼▼▼▼▼▼ 등록버튼 2차 시도 ▼▼▼▼▼▼▼──────────────────────────────#######
12261
12386
  begin
@@ -12444,6 +12569,8 @@ end
12444
12569
  end
12445
12570
  end
12446
12571
  end
12572
+ end
12573
+ end
12447
12574
  end
12448
12575
  end
12449
12576
  end
@@ -12464,6 +12591,7 @@ end
12464
12591
  end
12465
12592
  end
12466
12593
  end
12594
+ end
12467
12595
  ########─────────────────────────────▲▲▲▲▲▲▲ 등록버튼 2차 시도 ▲▲▲▲▲▲▲──────────────────────────────#######
12468
12596
  end
12469
12597
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: posting_zon
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.111.009
4
+ version: 3.111.010
5
5
  platform: ruby
6
6
  authors:
7
7
  - zon
8
8
  bindir: bin
9
9
  cert_chain: []
10
- date: 2025-06-26 00:00:00.000000000 Z
10
+ date: 2025-06-27 00:00:00.000000000 Z
11
11
  dependencies: []
12
12
  description: posting app
13
13
  email: mymin26@naver.com