posting_duo 3.111.009 → 3.111.011

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 +201 -45
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2de9fc90acc311fc1b0668c0817520630508be88b1a8d733711dc58480e3983f
4
- data.tar.gz: 764c7c616cda2e8a06ed156137c6f9522153c5ad10b031df42b62d1ca1e9e3fb
3
+ metadata.gz: a4cd17d412de36d2aec062690f7a3a76d73ac79cb0fcdb484bda70574eedf9fe
4
+ data.tar.gz: 334f73019b768690f1f69885eeda80dade1bf1357b39e09fa000d1957a108145
5
5
  SHA512:
6
- metadata.gz: e332ff7caf0e91784c075419f40ce0a134d676b686c2d2f6a686a5c07bb012d3ec9cd5b6325314d6ce2b3fbe767d4429062223ab9822578bcd97ac9adc9aa511
7
- data.tar.gz: 18f66654de5c2ac718d6577f5414746ed6fe86904191c429aa3849bde947bd5808a7a8a259fc1a0a3b601b604800943c566e07bc46083fa1ef8262a9fb6a3816
6
+ metadata.gz: 93ca8a79e4033389b0978d78ca9c8a19d73398d039637ff899a5c286695f959f06d9050b9f0efdadda741b54a7aef756142fddb4e054abc1367f4e819f362053
7
+ data.tar.gz: a667ed90db900429bc320e084e0714a2e582188353379451ee0f07f0a2b15b4b30dcef6392cfc63bea2d523d17581a07402f8198f523f11f85acef8e40716ec8
data/lib/posting_duo.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,15 @@ 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="글쓴이"]').clear
6895
+ sleep(1)
6896
+ @driver.find_element(xpath: '//input[@type="text" and @title="글쓴이"]').send_keys(user_id)
6897
+ sleep(1)
6898
+ puts '-[√] 닉네임 27코드 타겟.......'.yellow
6899
+ rescue
6900
+
6901
+ end
6885
6902
  end
6886
6903
  end
6887
6904
  end
@@ -7031,7 +7048,13 @@ begin
7031
7048
  sleep(1)
7032
7049
  puts '-[√] 패스워드 21코드 타겟.......'.yellow
7033
7050
  rescue
7034
-
7051
+ begin
7052
+ @driver.find_element(:id, 'userPw').send_keys(user_pw)
7053
+ sleep(1)
7054
+ puts '-[√] 패스워드 22코드 타겟.......'.yellow
7055
+ rescue
7056
+
7057
+ end
7035
7058
  end
7036
7059
  end
7037
7060
  end
@@ -7056,7 +7079,7 @@ begin
7056
7079
  sleep(1)
7057
7080
  end
7058
7081
  ##<─────────────────────────────────────────────────────────────────────패스워드 입력 코드 부분
7059
-
7082
+
7060
7083
  ##패스워드 입력 2차 코드 부분─────────────────────────────────────────────────────────────────────>
7061
7084
  begin
7062
7085
  @driver.find_element(:xpath, '//*[@for="blogPostPassword2"]').send_keys(user_pw)
@@ -8225,12 +8248,22 @@ end
8225
8248
  @driver.find_element(:xpath, '//*[@id="wr_content-html"]').click
8226
8249
  rescue
8227
8250
  begin
8228
-
8229
- html_bb = @driver.find_element(:xpath, '//*[@id="fwrite"]/div[2]/ul/li/label')
8230
- @driver.execute_script("arguments[0].scrollIntoView({block: 'center', inline: 'center'})", html_bb)
8231
- puts '-[√] HTML 코드 28 code.......'.yellow
8232
- sleep(1)
8233
- @driver.find_element(:xpath, '//*[@id="fwrite"]/div[2]/ul/li/label').click
8251
+
8252
+ html_bb = @driver.find_element(xpath: '//*[@id="fwrite"]/div[2]/ul/li/label')
8253
+
8254
+ # 텍스트 확인
8255
+ if html_bb.text.include?("비밀글")
8256
+ puts "비밀글 항목이므로 클릭하지 않음"
8257
+ raise #턴 넘김
8258
+ else
8259
+ html_bb = @driver.find_element(:xpath, '//*[@id="fwrite"]/div[2]/ul/li/label')
8260
+ @driver.execute_script("arguments[0].scrollIntoView({block: 'center', inline: 'center'})", html_bb)
8261
+ sleep(1)
8262
+ @driver.find_element(:xpath, '//*[@id="fwrite"]/div[2]/ul/li/label').click
8263
+ sleep(1)
8264
+ puts '-[√] HTML 코드 28 code.......'.yellow
8265
+ end
8266
+
8234
8267
  rescue
8235
8268
  begin
8236
8269
  @driver.switch_to.frame(@driver.find_element(:xpath, '//*[@id="NamoSE_Ifr__editor"]'))
@@ -8245,7 +8278,7 @@ end
8245
8278
  @driver.switch_to.default_content()
8246
8279
  html_bb = @driver.find_element(:xpath, '//*[@type="radio" and @name="rg_html_use" and @value="1"]')
8247
8280
  @driver.execute_script("arguments[0].scrollIntoView({block: 'center', inline: 'center'})", html_bb)
8248
- puts '-[√] HTML 코드 28 code.......'.yellow
8281
+ puts '-[√] HTML 코드 30 code.......'.yellow
8249
8282
  sleep(1)
8250
8283
  @driver.find_element(:xpath, '//*[@type="radio" and @name="rg_html_use" and @value="1"]').click
8251
8284
  rescue
@@ -8259,7 +8292,7 @@ end
8259
8292
  sleep(1)
8260
8293
  @driver.find_element(:xpath, '//*[@title="HTML 편집기"]').click
8261
8294
  @driver.switch_to.default_content()
8262
- puts '-[√] HTML 코드 29 code.......'.yellow
8295
+ puts '-[√] HTML 코드 31 code.......'.yellow
8263
8296
  sleep(1)
8264
8297
  rescue
8265
8298
  begin
@@ -8269,7 +8302,7 @@ end
8269
8302
  #아이프레임 나오기
8270
8303
  sleep(1)
8271
8304
  @driver.find_element(:xpath, '//*[@type="checkbox" and @name="ctype" and @value="H"]').click
8272
- puts '-[√] HTML 코드 30 code.......'.yellow
8305
+ puts '-[√] HTML 코드 32 code.......'.yellow
8273
8306
  sleep(1)
8274
8307
  rescue
8275
8308
  begin
@@ -8280,7 +8313,7 @@ end
8280
8313
  html_bb = @driver.find_element(:xpath, '//*[@class="combobox_mode"]').click
8281
8314
  sleep(1.5)
8282
8315
  html_bb = @driver.find_element(:xpath, '//*[@key="Html"]').click
8283
- puts '-[√] HTML 코드 31 code.......'.yellow
8316
+ puts '-[√] HTML 코드 33 code.......'.yellow
8284
8317
  sleep(1)
8285
8318
  rescue
8286
8319
  begin
@@ -8288,7 +8321,7 @@ end
8288
8321
  @driver.execute_script("arguments[0].scrollIntoView({block: 'center', inline: 'center'})", html_bb)
8289
8322
  sleep(1)
8290
8323
  html_bb = @driver.find_element(:xpath, '//*[@name="use_html"]').click
8291
- puts '-[√] HTML 코드 32 code.......'.yellow
8324
+ puts '-[√] HTML 코드 34 code.......'.yellow
8292
8325
  sleep(1)
8293
8326
  rescue
8294
8327
  begin
@@ -8296,7 +8329,7 @@ end
8296
8329
  @driver.execute_script("arguments[0].scrollIntoView({block: 'center', inline: 'center'})", html_bb)
8297
8330
  sleep(1)
8298
8331
  html_bb = @driver.find_element(:xpath, '//*[@class="note-btn btn-codeview note-codeview-keep"]').click
8299
- puts '-[√] HTML 코드 32 code.......'.yellow
8332
+ puts '-[√] HTML 코드 35 code.......'.yellow
8300
8333
  sleep(1)
8301
8334
  rescue
8302
8335
  begin
@@ -8309,39 +8342,49 @@ end
8309
8342
  sleep(1)
8310
8343
  @driver.find_element(:xpath, '//*[@data-button-id="html"]').click
8311
8344
  @driver.switch_to.default_content
8312
- puts '-[√] HTML 코드 33 code.......'.yellow
8345
+ puts '-[√] HTML 코드 36 code.......'.yellow
8313
8346
  sleep(1)
8314
8347
  rescue
8315
8348
  begin
8316
8349
  @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)
8350
+ html_bb = @driver.find_element(xpath: '//a[@href="#htmlEditor" and contains(@onclick, "html")]')
8351
+ @driver.execute_script("arguments[0].scrollIntoView({block: 'center', inline: 'center'})", html_bb)
8352
+ sleep(1)
8353
+ html_bb = @driver.find_element(xpath: '//a[@href="#htmlEditor" and contains(@onclick, "html")]').click
8354
+ puts '-[√] HTML 코드 37 code.......'.yellow
8332
8355
  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
8356
  rescue
8343
-
8344
- end
8357
+ begin
8358
+ @driver.switch_to.default_content
8359
+ if target_element
8360
+ # 3. 제목 요소 바로 아래에 체크박스 HTML 삽입
8361
+ checkbox_html = <<~HTML
8362
+ <div class="custom-control custom-checkbox custom-control-inline">
8363
+ <input type="checkbox" name="html" value="html2" id="html" onclick="html_auto_br(this);" class="custom-control-input">
8364
+ <label class="custom-control-label" for="html"><span>HTML</span></label>
8365
+ </div>
8366
+ HTML
8367
+ @driver.execute_script("arguments[0].insertAdjacentHTML('afterend', arguments[1]);", target_element, checkbox_html)
8368
+ puts '체크박스 HTML 강제 적용.......'.green
8369
+ sleep(1)
8370
+
8371
+ # 4. 삽입한 체크박스 스크롤하여 화면 중앙으로 이동
8372
+ html_checkbox = @driver.find_element(:xpath, '//*[@type="checkbox" and @name="html"]')
8373
+ @driver.execute_script("arguments[0].scrollIntoView({block: 'center', inline: 'center'})", html_checkbox)
8374
+ sleep(1)
8375
+
8376
+ # 5. HTML 토글 버튼 클릭
8377
+ @driver.find_element(:xpath, '//*[@type="checkbox" and @name="html"]').click
8378
+ puts '-[√] 임의 추가 HTML 코드 01 code.......'.yellow
8379
+ sleep(1)
8380
+
8381
+ else
8382
+ puts "타겟 제목 요소가 없어서 체크박스 삽입 불가".red
8383
+ end
8384
+ rescue
8385
+
8386
+ end
8387
+ end
8345
8388
  end
8346
8389
  end
8347
8390
  end
@@ -8704,12 +8747,16 @@ begin
8704
8747
  puts '내용 항목 코드 타겟 53.......'.red
8705
8748
  rescue
8706
8749
  begin
8750
+ @driver.find_element(xpath: '//textarea[@id="editor_textarea_1" and contains(@class, "htmlEditor")]').click
8751
+ puts '내용 항목 코드 타겟 54.......'.red
8752
+ rescue
8753
+ begin
8707
8754
  # 1. 첫 번째 iframe (id="namoIframe0") 진입
8708
8755
  @driver.switch_to.frame(@driver.find_element(:id, 'namoIframe0'))
8709
8756
  # 2. 두 번째 iframe (id="NamoSE_Ifr__namo0") 진입
8710
8757
  @driver.switch_to.frame(@driver.find_element(:id, 'NamoSE_Ifr__namo0'))
8711
8758
  @driver.find_element(id: 'NamoSE_editorshtml_namo0').click
8712
- puts '내용 항목 코드 타겟 54.......'.red
8759
+ puts '내용 항목 코드 타겟 55.......'.red
8713
8760
  @driver.switch_to.default_content
8714
8761
  rescue
8715
8762
  end
@@ -8766,6 +8813,7 @@ end
8766
8813
  end
8767
8814
  end
8768
8815
  end
8816
+ end
8769
8817
 
8770
8818
 
8771
8819
  end
@@ -10427,7 +10475,29 @@ if check_captcha == 0
10427
10475
  #아이프레임 나오기
10428
10476
  @driver.switch_to.default_content()
10429
10477
  rescue
10430
-
10478
+ begin
10479
+ @driver.switch_to.default_content()
10480
+ el = @driver.find_element(xpath: '//a[@id="captcha" and contains(@href, "captcha.aspx")]')
10481
+ puts '-[√] 캡챠 발견!! 캡차 해제를 위한 환경설정 약 10초 소요.......'.red
10482
+ puts '-[√] 캡챠 해제 중~ 해제 완료까지 마우스 움직이지 마세요.......'.red
10483
+ puts '-[√] 캡챠 코드 code 20.......'.red
10484
+ sleep(1)
10485
+ @driver.execute_script("arguments[0].scrollIntoView({behavior: 'smooth', block: 'center', inline: 'center'});", el) # 화면 가운데
10486
+ sleep(1)
10487
+ mouse_move_percentage(0.3,0.02)
10488
+ sleep(0.5)
10489
+ left_click
10490
+ sleep(1)
10491
+ #@driver.switch_to.window(@driver.window_handle) #핸들 주입
10492
+ @driver.action.context_click(el).perform #우 클릭
10493
+ sleep(1)
10494
+ @driver.action.key_down(:shift).key_stroke('m').key_up(:shift).perform #단축키
10495
+ sleep(1)
10496
+ puts '-[√] 캡챠 코드 타겟 완료1.......'.blue
10497
+
10498
+ rescue
10499
+
10500
+ end
10431
10501
  end
10432
10502
  end
10433
10503
  end
@@ -11556,7 +11626,49 @@ if check_captcha == 0
11556
11626
  puts '-[√] 캡챠 해제 가능 유무 확인.......'.green
11557
11627
  sleep(1)
11558
11628
  rescue
11559
-
11629
+ begin
11630
+
11631
+ @driver.find_element(xpath: '//input[@title="스팸방지필터"]').click
11632
+ sleep(1)
11633
+ el2 = @driver.find_element(xpath: '//input[@title="스팸방지필터"]')
11634
+ @driver.action.context_click(el2).perform
11635
+
11636
+ sleep(1)
11637
+ @driver.action.key_stroke('up')
11638
+ sleep(1)
11639
+ @driver.action.key_stroke('up')
11640
+ sleep(1)
11641
+ @driver.action.key_stroke('enter')
11642
+ sleep(1)
11643
+ begin
11644
+ # 요소 찾기 타임아웃을 7초로 설정
11645
+ wait = Selenium::WebDriver::Wait.new(:timeout => 7)
11646
+ #요소가 나타날 때까지 7초 동안 기다립니다.
11647
+ wait.until { @driver.find_element(:xpath, '//*[@class="captcha-solver captcha-solver_inner"]') }
11648
+ rescue
11649
+ sleep(1)
11650
+ @driver.action.key_stroke('left')
11651
+ sleep(1)
11652
+ @driver.action.key_stroke('up')
11653
+ sleep(1)
11654
+ @driver.action.key_stroke('enter')
11655
+ sleep(1)
11656
+ # 요소 찾기 타임아웃을 7초로 설정
11657
+ wait = Selenium::WebDriver::Wait.new(:timeout => 7)
11658
+ #요소가 나타날 때까지 7초 동안 기다립니다.
11659
+ wait.until { @driver.find_element(:xpath, '//*[@class="captcha-solver captcha-solver_inner"]') }
11660
+ end
11661
+ puts '-[√] 캡챠 코드 타겟 완료2.......'.blue
11662
+
11663
+ puts '-[√] 캡챠 해제 가능 유무 확인.......'.green
11664
+ sleep(2)
11665
+ puts '-[√] 캡챠 해제 가능 유무 확인.......'.green
11666
+ sleep(2)
11667
+ puts '-[√] 캡챠 해제 가능 유무 확인.......'.green
11668
+ sleep(1)
11669
+ rescue
11670
+
11671
+ end
11560
11672
  end
11561
11673
  end
11562
11674
  end
@@ -12256,6 +12368,46 @@ ss_button = @driver.find_element(:xpath, "//a[@onclick='spamChkForm()' and norma
12256
12368
  puts '-[√] 등록을 49번 코드로 시도하였습니다.......'.magenta
12257
12369
  sleep(1)
12258
12370
 
12371
+ rescue
12372
+ begin
12373
+ ss_button = @driver.find_element(xpath: "//img[@src='images/confirm.gif']")
12374
+ @driver.execute_script("arguments[0].scrollIntoView({block: 'center', inline: 'center'})", ss_button)
12375
+ sleep(1)
12376
+
12377
+ ss_button = @driver.find_element(xpath: "//img[@src='images/confirm.gif']").click
12378
+ puts '-[√] 등록을 50번 코드로 시도하였습니다.......'.magenta
12379
+ sleep(1)
12380
+
12381
+ rescue
12382
+ begin
12383
+ ss_button = @driver.find_element(css: 'img[src*="btn_ok.gif"][alt="확인"]')
12384
+ @driver.execute_script("arguments[0].scrollIntoView({block: 'center', inline: 'center'})", ss_button)
12385
+ sleep(1)
12386
+
12387
+ ss_button = @driver.find_element(css: 'img[src*="btn_ok.gif"][alt="확인"]').click
12388
+ puts '-[√] 등록을 51번 코드로 시도하였습니다.......'.magenta
12389
+ sleep(1)
12390
+
12391
+ rescue
12392
+ begin
12393
+ ss_button = @driver.find_element(xpath: '//span[@class="button"]/input[@type="submit" and @value="저장하기"]')
12394
+ @driver.execute_script("arguments[0].scrollIntoView({block: 'center', inline: 'center'})", ss_button)
12395
+ sleep(1)
12396
+
12397
+ ss_button = @driver.find_element(xpath: '//span[@class="button"]/input[@type="submit" and @value="저장하기"]').click
12398
+ puts '-[√] 등록을 52번 코드로 시도하였습니다.......'.magenta
12399
+ sleep(1)
12400
+
12401
+ rescue
12402
+ begin
12403
+ ss_button = @driver.find_element(xpath: '//button[@type="submit" and contains(@class, "btn_insert") and contains(normalize-space(.), "등록")]')
12404
+ @driver.execute_script("arguments[0].scrollIntoView({block: 'center', inline: 'center'})", ss_button)
12405
+ sleep(1)
12406
+
12407
+ ss_button = @driver.find_element(xpath: '//button[@type="submit" and contains(@class, "btn_insert") and contains(normalize-space(.), "등록")]').click
12408
+ puts '-[√] 등록을 53번 코드로 시도하였습니다.......'.magenta
12409
+ sleep(1)
12410
+
12259
12411
  rescue
12260
12412
  ########─────────────────────────────▼▼▼▼▼▼▼ 등록버튼 2차 시도 ▼▼▼▼▼▼▼──────────────────────────────#######
12261
12413
  begin
@@ -12444,6 +12596,9 @@ end
12444
12596
  end
12445
12597
  end
12446
12598
  end
12599
+ end
12600
+ end
12601
+ end
12447
12602
  end
12448
12603
  end
12449
12604
  end
@@ -12464,6 +12619,7 @@ end
12464
12619
  end
12465
12620
  end
12466
12621
  end
12622
+ end
12467
12623
  ########─────────────────────────────▲▲▲▲▲▲▲ 등록버튼 2차 시도 ▲▲▲▲▲▲▲──────────────────────────────#######
12468
12624
  end
12469
12625
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: posting_duo
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.111.009
4
+ version: 3.111.011
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-30 00:00:00.000000000 Z
11
11
  dependencies: []
12
12
  description: File to Clipboard gem
13
13
  email: mymin26@naver.com