board_posting_duo 0.0.79 → 0.0.91
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.
- checksums.yaml +4 -4
- data/lib/board_posting_duo.rb +179 -31
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3ff2c0689bd245ea1b9334194529d85bdcf23437643164db918cdd0019c54420
|
4
|
+
data.tar.gz: f9b58180373176e1c1c5ecff0d460af542791ea98b03ab7a5f353021a28b0a21
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cae149ea684da66760cc4940fdcea94a6599f15b75bb0632a2b7d3838d094859a478ae1dffcc0d7b2429dd2fb212ac6ad1975ae5b592bb09caa7df6a63f90d36
|
7
|
+
data.tar.gz: 1700f3974ab5dfae3f9a4708667d0923a3624c0cd2ec1c58addbc99c9385167064d41bf6557da2b7d3c30e1dfb6c2490df72647f43eb74d71b33e035f756ba7c
|
data/lib/board_posting_duo.rb
CHANGED
@@ -818,7 +818,11 @@ sleep(2)
|
|
818
818
|
begin
|
819
819
|
@driver.find_element(:xpath, '//*[@id="agree"]').click
|
820
820
|
rescue
|
821
|
-
|
821
|
+
begin
|
822
|
+
@driver.find_element(:xpath, '//*[@name="check_2"]').click
|
823
|
+
rescue
|
824
|
+
|
825
|
+
end
|
822
826
|
end
|
823
827
|
end
|
824
828
|
end
|
@@ -865,7 +869,7 @@ sleep(2)
|
|
865
869
|
@driver.find_element(:xpath, '//*[@name="userId"]').send_keys(user_id)
|
866
870
|
rescue
|
867
871
|
begin
|
868
|
-
@driver.find_element(:xpath, '//*[@name="
|
872
|
+
@driver.find_element(:xpath, '//*[@name="user_login"]').send_keys(user_id)
|
869
873
|
rescue
|
870
874
|
|
871
875
|
end
|
@@ -949,7 +953,7 @@ sleep(2)
|
|
949
953
|
begin
|
950
954
|
@driver.find_element(:xpath, '//*[@name="mf-password"]').send_keys(user_pw)
|
951
955
|
rescue
|
952
|
-
|
956
|
+
|
953
957
|
end
|
954
958
|
end
|
955
959
|
end
|
@@ -991,7 +995,11 @@ sleep(2)
|
|
991
995
|
begin
|
992
996
|
@driver.find_element(:xpath, '//*[@id="userPassCk"]').send_keys(user_pw)
|
993
997
|
rescue
|
994
|
-
|
998
|
+
begin
|
999
|
+
@driver.find_element(:xpath, '//*[@for="confirm_password"]').send_keys(user_pw)
|
1000
|
+
rescue
|
1001
|
+
|
1002
|
+
end
|
995
1003
|
end
|
996
1004
|
end
|
997
1005
|
end
|
@@ -1040,7 +1048,11 @@ sleep(2)
|
|
1040
1048
|
begin
|
1041
1049
|
@driver.find_element(:xpath, '//*[@placeholder="이름을 입력해주세요"]').send_keys(''+name1_value+''+name2_value+''+name3_value+'')
|
1042
1050
|
rescue
|
1043
|
-
|
1051
|
+
begin
|
1052
|
+
@driver.find_element(:xpath, '//*[@name="first_name"]').send_keys(''+name1_value+''+name2_value+''+name3_value+'')
|
1053
|
+
rescue
|
1054
|
+
|
1055
|
+
end
|
1044
1056
|
end
|
1045
1057
|
end
|
1046
1058
|
end
|
@@ -1164,7 +1176,11 @@ sleep(2)
|
|
1164
1176
|
begin
|
1165
1177
|
@driver.find_element(:xpath, '//*[@name="mf-email"]').send_keys(''+user_id+'@gmail.com')
|
1166
1178
|
rescue
|
1167
|
-
|
1179
|
+
begin
|
1180
|
+
@driver.find_element(:xpath, '//*[@name="user_email"]').send_keys(''+user_id+'@gmail.com')
|
1181
|
+
rescue
|
1182
|
+
|
1183
|
+
end
|
1168
1184
|
end
|
1169
1185
|
end
|
1170
1186
|
end
|
@@ -1209,7 +1225,11 @@ sleep(2)
|
|
1209
1225
|
begin
|
1210
1226
|
@driver.find_element(:xpath, '//*[@id="mb_hp_1"]').send_keys('010'''+p_nomber1+''+p_nomber2+''+p_nomber3+''+p_nomber4+''+p_nomber5+''+p_nomber6+''+p_nomber7+''+p_nomber8+'')
|
1211
1227
|
rescue
|
1212
|
-
|
1228
|
+
begin
|
1229
|
+
@driver.find_element(:xpath, '//*[@name="phone1""]').send_keys('010'''+p_nomber1+''+p_nomber2+''+p_nomber3+''+p_nomber4+''+p_nomber5+''+p_nomber6+''+p_nomber7+''+p_nomber8+'')
|
1230
|
+
rescue
|
1231
|
+
|
1232
|
+
end
|
1213
1233
|
end
|
1214
1234
|
end
|
1215
1235
|
end
|
@@ -1624,7 +1644,38 @@ rescue
|
|
1624
1644
|
sleep(1)
|
1625
1645
|
puts '-[√] 캡챠 코드 타겟 완료1.......'.blue
|
1626
1646
|
rescue
|
1627
|
-
|
1647
|
+
begin
|
1648
|
+
@driver.switch_to.default_content()
|
1649
|
+
#@driver.find_element(:xpath, '//*[@class="CodeImage"]')
|
1650
|
+
el = @driver.find_element(:xpath, '//*[@class="lazy-loaded"]')
|
1651
|
+
@driver.action.move_to(el).perform
|
1652
|
+
puts '-[√] 캡챠 발견!! 캡차 해제를 위한 환경설정 약 10초 소요.......'.red
|
1653
|
+
puts '-[√] 챕챠 해제 중~ 해제 완료까지 마우스 움직이지 마세요.......'.red
|
1654
|
+
puts '-[√] 챕챠 코드 code 11.......'.red
|
1655
|
+
sleep(1)
|
1656
|
+
mouse_move_percentage(0.3,0.02)
|
1657
|
+
sleep(0.5)
|
1658
|
+
left_click
|
1659
|
+
sleep(1)
|
1660
|
+
@driver.find_element(:xpath, '//*[@class="lazy-loaded"]').click
|
1661
|
+
sleep(1)
|
1662
|
+
#@driver.manage.window.position = Selenium::WebDriver::Point.new(0, 0)
|
1663
|
+
#sleep(2)
|
1664
|
+
#@driver.manage.window.maximize
|
1665
|
+
|
1666
|
+
|
1667
|
+
el1 = @driver.find_element(:xpath, '//*[@class="lazy-loaded"]')
|
1668
|
+
@driver.action.context_click(el1).perform
|
1669
|
+
sleep(1)
|
1670
|
+
@driver.action.key_down(:shift).key_stroke('m').key_up(:shift).perform #컨트롤+a
|
1671
|
+
#key_down('shift')
|
1672
|
+
#key_stroke('m')
|
1673
|
+
#key_up('shift')
|
1674
|
+
sleep(1)
|
1675
|
+
puts '-[√] 캡챠 코드 타겟 완료1.......'.blue
|
1676
|
+
rescue
|
1677
|
+
|
1678
|
+
end
|
1628
1679
|
end
|
1629
1680
|
end
|
1630
1681
|
end
|
@@ -2119,7 +2170,46 @@ rescue
|
|
2119
2170
|
puts '-[√] 캡챠 코드 타겟 완료2.......'.blue
|
2120
2171
|
sleep(1)
|
2121
2172
|
rescue
|
2122
|
-
|
2173
|
+
begin
|
2174
|
+
@driver.switch_to.default_content()
|
2175
|
+
sleep(1)
|
2176
|
+
@driver.find_element(:xpath, '//*[@id="captcha_code"]').click
|
2177
|
+
|
2178
|
+
sleep(1)
|
2179
|
+
|
2180
|
+
el2 = @driver.find_element(:xpath, '//*[@id="captcha_code"]')
|
2181
|
+
@driver.action.context_click(el2).perform
|
2182
|
+
|
2183
|
+
sleep(1)
|
2184
|
+
@driver.action.key_stroke('up')
|
2185
|
+
sleep(1)
|
2186
|
+
@driver.action.key_stroke('up')
|
2187
|
+
sleep(1)
|
2188
|
+
@driver.action.key_stroke('enter')
|
2189
|
+
sleep(1)
|
2190
|
+
begin
|
2191
|
+
# 요소 찾기 타임아웃을 7초로 설정
|
2192
|
+
wait = Selenium::WebDriver::Wait.new(:timeout => 7)
|
2193
|
+
#요소가 나타날 때까지 7초 동안 기다립니다.
|
2194
|
+
wait.until { @driver.find_element(:xpath, '//*[@class="captcha-solver captcha-solver_inner"]') }
|
2195
|
+
rescue
|
2196
|
+
sleep(1)
|
2197
|
+
@driver.action.key_stroke('left')
|
2198
|
+
sleep(1)
|
2199
|
+
@driver.action.key_stroke('up')
|
2200
|
+
sleep(1)
|
2201
|
+
@driver.action.key_stroke('enter')
|
2202
|
+
sleep(1)
|
2203
|
+
# 요소 찾기 타임아웃을 7초로 설정
|
2204
|
+
wait = Selenium::WebDriver::Wait.new(:timeout => 7)
|
2205
|
+
#요소가 나타날 때까지 7초 동안 기다립니다.
|
2206
|
+
wait.until { @driver.find_element(:xpath, '//*[@class="captcha-solver captcha-solver_inner"]') }
|
2207
|
+
end
|
2208
|
+
puts '-[√] 캡챠 코드 타겟 완료2.......'.blue
|
2209
|
+
sleep(1)
|
2210
|
+
rescue
|
2211
|
+
|
2212
|
+
end
|
2123
2213
|
end
|
2124
2214
|
end
|
2125
2215
|
end
|
@@ -2261,7 +2351,7 @@ end
|
|
2261
2351
|
end
|
2262
2352
|
end
|
2263
2353
|
end
|
2264
|
-
|
2354
|
+
|
2265
2355
|
##<─────────────────────────────────────────────────────────────────────가입 확인 버튼
|
2266
2356
|
##<─────────────────────────────────────────────────────────────────────가입 확인 버튼
|
2267
2357
|
##<─────────────────────────────────────────────────────────────────────가입 확인 버튼
|
@@ -2546,7 +2636,7 @@ login_url = option['login_url'].to_s
|
|
2546
2636
|
rescue
|
2547
2637
|
end
|
2548
2638
|
|
2549
|
-
|
2639
|
+
|
2550
2640
|
|
2551
2641
|
|
2552
2642
|
##팝업 코드 확인 및 제거 부분─────────────────────────────────────────────────────────────────────>
|
@@ -3206,12 +3296,17 @@ login_url = option['login_url'].to_s
|
|
3206
3296
|
begin
|
3207
3297
|
@driver.find_element(:xpath, '//*[@id="ol_idlabel"]').send_keys(user_id)
|
3208
3298
|
sleep(3)
|
3209
|
-
rescue
|
3210
|
-
|
3211
|
-
|
3212
|
-
|
3213
|
-
|
3214
|
-
|
3299
|
+
rescue
|
3300
|
+
begin
|
3301
|
+
@driver.find_element(:xpath, '//*[@class="username"]').send_keys(user_id)
|
3302
|
+
sleep(3)
|
3303
|
+
rescue => e
|
3304
|
+
puts '-[√] 로그인 페이지 접속 시도 실패 (페이지 로딩 지연 및 접속 불량).......'.red
|
3305
|
+
puts '-[√] 다음 작업 준비로 약 1초~60초 내외 시간이 소요됩니다.......'.red
|
3306
|
+
puts e
|
3307
|
+
@driver.close
|
3308
|
+
return 0
|
3309
|
+
end
|
3215
3310
|
end
|
3216
3311
|
end
|
3217
3312
|
end
|
@@ -3915,7 +4010,7 @@ post_url = option['post_url'].to_s
|
|
3915
4010
|
|
3916
4011
|
|
3917
4012
|
begin
|
3918
|
-
|
4013
|
+
|
3919
4014
|
chat_box = @driver.find_element(:xpath, '//*[@class="adsbygoogle adsbygoogle-noablate"]')
|
3920
4015
|
@driver.execute_script("arguments[0].remove();", chat_box)
|
3921
4016
|
puts '-[√] 숨김 code 1 제거 완료.......'.green
|
@@ -3924,7 +4019,7 @@ post_url = option['post_url'].to_s
|
|
3924
4019
|
end
|
3925
4020
|
|
3926
4021
|
begin
|
3927
|
-
|
4022
|
+
|
3928
4023
|
chat_box = @driver.find_element(:xpath, '//*[@class="google-auto-placed"]')
|
3929
4024
|
@driver.execute_script("arguments[0].remove();", chat_box)
|
3930
4025
|
puts '-[√] 숨김 code 2 제거 완료.......'.green
|
@@ -3933,7 +4028,7 @@ post_url = option['post_url'].to_s
|
|
3933
4028
|
end
|
3934
4029
|
|
3935
4030
|
begin
|
3936
|
-
|
4031
|
+
|
3937
4032
|
chat_box = @driver.find_elements(:xpath, '//*[@class="adsbygoogle adsbygoogle-noablate"]')[1]
|
3938
4033
|
@driver.execute_script("arguments[0].remove();", chat_box)
|
3939
4034
|
puts '-[√] 숨김 code 3 제거 완료.......'.green
|
@@ -3942,7 +4037,7 @@ post_url = option['post_url'].to_s
|
|
3942
4037
|
end
|
3943
4038
|
|
3944
4039
|
begin
|
3945
|
-
|
4040
|
+
|
3946
4041
|
chat_box = @driver.find_elements(:xpath, '//*[@class="adsbygoogle adsbygoogle-noablate"]')[2]
|
3947
4042
|
@driver.execute_script("arguments[0].remove();", chat_box)
|
3948
4043
|
puts '-[√] 숨김 code 4 제거 완료.......'.green
|
@@ -3951,7 +4046,7 @@ post_url = option['post_url'].to_s
|
|
3951
4046
|
end
|
3952
4047
|
|
3953
4048
|
begin
|
3954
|
-
|
4049
|
+
|
3955
4050
|
chat_box = @driver.find_elements(:xpath, '//*[@class="adsbygoogle adsbygoogle-noablate"]')[3]
|
3956
4051
|
@driver.execute_script("arguments[0].remove();", chat_box)
|
3957
4052
|
puts '-[√] 숨김 code 5 제거 완료.......'.green
|
@@ -3959,12 +4054,38 @@ post_url = option['post_url'].to_s
|
|
3959
4054
|
rescue
|
3960
4055
|
end
|
3961
4056
|
|
3962
|
-
|
4057
|
+
begin
|
4058
|
+
|
4059
|
+
chat_box = @driver.find_element(:xpath, '//*[@id="page_wrap"]/header')
|
4060
|
+
@driver.execute_script("arguments[0].remove();", chat_box)
|
4061
|
+
puts '-[√] 숨김 code 6 제거 완료.......'.green
|
4062
|
+
sleep(1)
|
4063
|
+
rescue
|
4064
|
+
end
|
4065
|
+
|
4066
|
+
begin
|
4067
|
+
|
4068
|
+
chat_box = @driver.find_element(:xpath, '//*[@id="contact-form3"]')
|
4069
|
+
@driver.execute_script("arguments[0].remove();", chat_box)
|
4070
|
+
puts '-[√] 숨김 code 7 제거 완료.......'.green
|
4071
|
+
sleep(1)
|
4072
|
+
rescue
|
4073
|
+
end
|
4074
|
+
|
4075
|
+
begin
|
4076
|
+
|
4077
|
+
chat_box = @driver.find_element(:xpath, '//*[@id="across_adn_container"]')
|
4078
|
+
@driver.execute_script("arguments[0].remove();", chat_box)
|
4079
|
+
puts '-[√] 숨김 code 8 제거 완료.......'.green
|
4080
|
+
sleep(1)
|
4081
|
+
rescue
|
4082
|
+
end
|
4083
|
+
|
3963
4084
|
|
3964
4085
|
end
|
3965
4086
|
|
3966
4087
|
|
3967
|
-
|
4088
|
+
|
3968
4089
|
|
3969
4090
|
|
3970
4091
|
|
@@ -5493,7 +5614,21 @@ begin
|
|
5493
5614
|
puts '-[√] HTML 코드 26 code.......'.yellow
|
5494
5615
|
sleep(1)
|
5495
5616
|
rescue
|
5496
|
-
|
5617
|
+
begin
|
5618
|
+
|
5619
|
+
@driver.find_element(:xpath, '//*[@id="wr_content-html"]').click
|
5620
|
+
puts '-[√] HTML 코드 27 code.......'.yellow
|
5621
|
+
sleep(1)
|
5622
|
+
rescue
|
5623
|
+
begin
|
5624
|
+
|
5625
|
+
@driver.find_element(:xpath, '//*[@id="fwrite"]/div[2]/ul/li/label').click
|
5626
|
+
puts '-[√] HTML 코드 28 code.......'.yellow
|
5627
|
+
sleep(1)
|
5628
|
+
rescue
|
5629
|
+
|
5630
|
+
end
|
5631
|
+
end
|
5497
5632
|
end
|
5498
5633
|
end
|
5499
5634
|
|
@@ -5740,7 +5875,19 @@ rescue
|
|
5740
5875
|
sleep(1)
|
5741
5876
|
puts '내용 항목 코드 타겟 35.......'.red
|
5742
5877
|
rescue
|
5743
|
-
|
5878
|
+
begin
|
5879
|
+
@driver.find_element(:xpath, '/html/body/div[1]/div[2]/div/div/section/form/div[4]/div/textarea').click
|
5880
|
+
sleep(1)
|
5881
|
+
puts '내용 항목 코드 타겟 35.......'.red
|
5882
|
+
rescue
|
5883
|
+
begin
|
5884
|
+
@driver.find_element(:xpath, '/html/body/div[1]/div[2]/div/div/section/form/div[4]/div/textarea').click
|
5885
|
+
sleep(1)
|
5886
|
+
puts '내용 항목 코드 타겟 35.......'.red
|
5887
|
+
rescue
|
5888
|
+
|
5889
|
+
end
|
5890
|
+
end
|
5744
5891
|
end
|
5745
5892
|
end
|
5746
5893
|
end
|
@@ -8680,7 +8827,7 @@ class Wordpress
|
|
8680
8827
|
end
|
8681
8828
|
|
8682
8829
|
|
8683
|
-
|
8830
|
+
|
8684
8831
|
begin
|
8685
8832
|
option['signup_url'] = table[1].to_s.force_encoding('utf-8').to_s
|
8686
8833
|
if option['signup_url'].to_s == '회원가입'
|
@@ -8726,7 +8873,7 @@ class Wordpress
|
|
8726
8873
|
option['category'] = ''
|
8727
8874
|
end
|
8728
8875
|
|
8729
|
-
|
8876
|
+
|
8730
8877
|
option['proxy'] = ''
|
8731
8878
|
if @data['포스트설정']['프록시'].checked?
|
8732
8879
|
if table[8].to_i > table[10].to_i
|
@@ -8792,6 +8939,7 @@ class Wordpress
|
|
8792
8939
|
@data['table'][index][-1] = 5
|
8793
8940
|
@data['table'] << []
|
8794
8941
|
@data['table'].pop
|
8942
|
+
|
8795
8943
|
if @data['키워드설정']['키워드'].length == 0
|
8796
8944
|
keyword = ''
|
8797
8945
|
else
|
@@ -9419,7 +9567,7 @@ class Wordpress
|
|
9419
9567
|
end
|
9420
9568
|
end
|
9421
9569
|
end
|
9422
|
-
|
9570
|
+
|
9423
9571
|
if check_success == 0
|
9424
9572
|
break
|
9425
9573
|
end
|
@@ -9925,7 +10073,7 @@ class Wordpress
|
|
9925
10073
|
file_data = File.open(file, 'r', :encoding => 'utf-8').read()
|
9926
10074
|
file_data.split("\n").each do |keyword|
|
9927
10075
|
if keyword.split(' ').join('').length < 2
|
9928
|
-
|
10076
|
+
|
9929
10077
|
else
|
9930
10078
|
@data['키워드설정']['키워드'] << [false, keyword]
|
9931
10079
|
@data['키워드설정']['키워드'] << [false, keyword]
|
@@ -10005,7 +10153,7 @@ class Wordpress
|
|
10005
10153
|
if file != nil
|
10006
10154
|
file_data = File.open(file, 'r', :encoding => 'utf-8').read()
|
10007
10155
|
file_data.split("\n").each do |title|
|
10008
|
-
if title.split(
|
10156
|
+
if title.split(' ').join('').length < 2
|
10009
10157
|
|
10010
10158
|
else
|
10011
10159
|
@data['제목설정']['제목'] << [false, title]
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: board_posting_duo
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.91
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- soonje
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-09-
|
11
|
+
date: 2024-09-30 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: File to Clipboard gem
|
14
14
|
email: rnjstnswp123@naver.com
|