posting_duo 3.111.013 → 3.111.017

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 +34 -4
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a5d822c7044b56fc799bab10790b7d66789cdfbca78ff77237797066516f3f23
4
- data.tar.gz: a75b34e8c12d9c57f660b870f771794d92560afed23392c84f61b34d74d23529
3
+ metadata.gz: 86bc708d8839f55c2485989229a8b85f5523ae2956264c14840438d24b1fd26a
4
+ data.tar.gz: f44c1783122486a3d8153abc536b98f9a620e36cdafcbbbc896454a62b01190c
5
5
  SHA512:
6
- metadata.gz: c37f29d2f33ab200f0c18df1b798b393532fff20d61597f021ae915587438cc7f3ab7e9d44b7912210288c3b166e2e4092419d75527d7d7341655cb141e681b4
7
- data.tar.gz: ba5e47f6e5edb8613ca65925533a9c23ae22f316243b1c0b3d572c044c02f4494a41a7b27609d86acfdda2ddc74aeebc4b96ab5b398497982827011a908ae6b6
6
+ metadata.gz: abeb6b8dc0cde2eb4e960f9e057fbdf1ecabd769094d7224a63aa9add4552a56f3736bdc953dbfedd54b5c18b28ed1d859947dad239abec0aaf25adc82c330f4
7
+ data.tar.gz: '005639ffd402845a242e02f9f1ef928846fbc8d58ab96d7c37af25381021a61508adbb061e3722f95d92284de99a675b8f13de97077ff8c0f4265e049b605f6d'
data/lib/posting_duo.rb CHANGED
@@ -7436,6 +7436,18 @@ begin
7436
7436
  @driver.close
7437
7437
  end
7438
7438
 
7439
+
7440
+ begin #셀클럽 카테고리 2차 타겟
7441
+ @driver.find_element(:xpath, '//*[@name="ext6_00" and @itemname="등록분류"]').click
7442
+ puts '-[√] 셀클럽 2차 카테고리 확인!! 자동 선택 진행.......'.red
7443
+ sleep(1)
7444
+ @driver.action.key_down(:down).key_up(:down).perform
7445
+ sleep(1)
7446
+ @driver.action.key_down(:enter).key_up(:enter).perform
7447
+ sleep(1)
7448
+ rescue
7449
+ end
7450
+
7439
7451
  ##<─────────────────────────────────────────────────────────────────────카테고리 선택 코드 부분
7440
7452
 
7441
7453
 
@@ -8037,7 +8049,21 @@ end
8037
8049
 
8038
8050
  begin
8039
8051
  #아이프레임에서 코드 선택
8040
- @driver.switch_to.frame(@driver.find_element(:xpath, '//*[@scrolling="no"]'))
8052
+ # 1. 모든 scrolling="no" iframe 수집
8053
+ iframes = @driver.find_elements(:xpath, '//iframe[@scrolling="no"]')
8054
+
8055
+ # 2. 제외할 iframe id 또는 name 리스트
8056
+ blacklist = ["loginiframe", "ad_iframe", "popupiframe"]
8057
+
8058
+ # 3. 걸러낸 iframe 중 첫 번째 유효한 iframe 선택
8059
+ target_iframe = iframes.find do |frame|
8060
+ id = frame.attribute("id")
8061
+ name = frame.attribute("name")
8062
+ !blacklist.include?(id) && !blacklist.include?(name)
8063
+ end
8064
+
8065
+ # 4. 해당 iframe으로 전환
8066
+ @driver.switch_to.frame(target_iframe)
8041
8067
 
8042
8068
  html_bb = @driver.find_element(:xpath, '//*[@class="se2_to_html"]')
8043
8069
  @driver.execute_script("arguments[0].scrollIntoView({block: 'center', inline: 'center'})", html_bb)
@@ -10040,11 +10066,13 @@ if check_captcha == 0
10040
10066
  puts '-[√] 캡챠 해제 중~ 해제 완료까지 마우스 움직이지 마세요.......'.red
10041
10067
  puts '-[√] 캡챠 코드 code 3.......'.red
10042
10068
  sleep(1)
10069
+ begin
10043
10070
  #요소 자체 제거 하기 기능
10044
10071
  chat_box = @driver.find_element(:xpath, '//*[@for="captcha_key"]')
10045
10072
  @driver.execute_script("arguments[0].remove();", chat_box)
10046
10073
  sleep(1)
10047
-
10074
+ rescue
10075
+ end
10048
10076
  sleep(1)
10049
10077
  @driver.execute_script("arguments[0].scrollIntoView({behavior: 'smooth', block: 'center', inline: 'center'});", el) # 화면 가운데
10050
10078
  sleep(1)
@@ -12132,8 +12160,8 @@ sleep(1)
12132
12160
  rescue
12133
12161
  begin
12134
12162
  ss_button = @driver.find_element(:xpath, '//*[@type="submit"]')
12135
- if ss_button.attribute("class") == "upload_btn1"
12136
- raise
12163
+ if ss_button.attribute("class") == "upload_btn1" || ss_button.attribute("class") == "btn btn-default"
12164
+ raise
12137
12165
  end
12138
12166
 
12139
12167
  @driver.execute_script("arguments[0].scrollIntoView({block: 'center', inline: 'center'})", ss_button)
@@ -12434,6 +12462,7 @@ ss_button = @driver.find_element(xpath: '//img[contains(@src, "btn_write.gif")]'
12434
12462
  puts '-[√] 등록을 54번 코드로 시도하였습니다.......'.magenta
12435
12463
  sleep(1)
12436
12464
  '//button[@type="submit" and contains(@class, "kboard-default-button-small") and contains(text(), "저장하기")]'
12465
+
12437
12466
  rescue
12438
12467
  begin
12439
12468
  ss_button = @driver.find_element(xpath: '//button[@type="submit" and contains(@class, "kboard-default-button-small") and contains(text(), "저장하기")]')
@@ -12444,6 +12473,7 @@ ss_button = @driver.find_element(xpath: '//button[@type="submit" and contains(@c
12444
12473
  puts '-[√] 등록을 55번 코드로 시도하였습니다.......'.magenta
12445
12474
  sleep(1)
12446
12475
 
12476
+
12447
12477
  rescue
12448
12478
  ########─────────────────────────────▼▼▼▼▼▼▼ 등록버튼 2차 시도 ▼▼▼▼▼▼▼──────────────────────────────#######
12449
12479
  begin
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.013
4
+ version: 3.111.017
5
5
  platform: ruby
6
6
  authors:
7
7
  - zon
8
8
  bindir: bin
9
9
  cert_chain: []
10
- date: 2025-07-02 00:00:00.000000000 Z
10
+ date: 2025-07-03 00:00:00.000000000 Z
11
11
  dependencies: []
12
12
  description: File to Clipboard gem
13
13
  email: mymin26@naver.com