board_posting_duo 0.0.33 → 0.0.37
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 +81 -65
- 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: c51ebcc6b46612e3170b6535d6974e04257a30c8c1e92cda382e3208996b7a60
|
4
|
+
data.tar.gz: fc755aa189221204e29475a29cbc0522e9528aeb9996ef749e77915a268bc8bb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dc6c72a751df83d0ac3ff6f21c582ce5c79341ec06c9509c913bf06a29a66b4ff37cce24a7483215ba72239daa8579947be9ccb958e11cac7a16f8f56d456ae6
|
7
|
+
data.tar.gz: 993ce2194843292a7caf1c123c91a9e27b86b8729bd7ff1b2964bb5a3466df4b79e322a768a74dc2decb39fdef61a3611b44ae01439bce47bac49ecb74d9e384
|
data/lib/board_posting_duo.rb
CHANGED
@@ -41,92 +41,88 @@ class Naver
|
|
41
41
|
options.page_load_strategy = :normal
|
42
42
|
options.timeouts = {page_load: 20_000}
|
43
43
|
options.add_argument('--start-maximized')
|
44
|
-
options.add_argument('
|
45
|
-
options.add_argument('--disable-popup-blocking')
|
46
|
-
options.add_argument('--dns-prefetch-disable')
|
47
|
-
options.add_argument('--disable-dev-shm-usage')
|
48
|
-
options.add_argument('--disable-software-rasterizer')
|
49
|
-
options.add_argument('--ignore-certificate-errors')
|
50
|
-
options.add_argument('--disable-gpu') # GPU가속 끄기
|
51
|
-
options.excludeSwitches('enable-automation') #자동화된 테스트...제거
|
52
|
-
options.add_argument('user-agent=Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.100 Safari/537.36') # user-agent 위조
|
53
|
-
|
54
|
-
options.add_argument('--disable-web-security')
|
55
|
-
options.add_argument('--allow-running-insecure-content')
|
56
|
-
options.add_argument('--ignore-certificate-errors')
|
57
|
-
options.add_argument('--allow-insecure-localhost')
|
58
|
-
options.add_argument('--no-sandbox')
|
59
|
-
|
60
|
-
options.add_argument('--disable-translate')
|
61
|
-
options.add_argument('--disable-extensions-file-access-check')
|
62
|
-
options.add_argument('--disable-impl-side-painting')
|
63
|
-
|
44
|
+
options.add_argument('user-agent=Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.6613.85 Safari/537.36') # user-agent 위조
|
64
45
|
|
46
|
+
#options.add_argument('--disable-blink-features=AutomationControlled')
|
47
|
+
#options.add_argument('--disable-popup-blocking')
|
48
|
+
#options.add_argument('--dns-prefetch-disable')
|
49
|
+
#options.add_argument('--disable-dev-shm-usage')
|
50
|
+
#options.add_argument('--disable-software-rasterizer')
|
51
|
+
#options.add_argument('--ignore-certificate-errors')
|
52
|
+
#options.add_argument('--disable-gpu') # GPU가속 끄기
|
53
|
+
#options.excludeSwitches('enable-automation') #자동화된 테스트...제거
|
54
|
+
#options.add_argument('--disable-web-security')
|
55
|
+
#options.add_argument('--allow-running-insecure-content')
|
56
|
+
#options.add_argument('--ignore-certificate-errors')
|
57
|
+
#options.add_argument('--allow-insecure-localhost')
|
58
|
+
#options.add_argument('--no-sandbox')
|
59
|
+
#options.add_argument('--disable-translate')
|
60
|
+
#options.add_argument('--disable-extensions-file-access-check')
|
61
|
+
#options.add_argument('--disable-impl-side-painting')
|
65
62
|
@driver = Selenium::WebDriver.for(:chrome, capabilities: options)
|
66
63
|
rescue
|
67
64
|
@driver = Selenium::WebDriver.for(:chrome, capabilities: options)
|
68
65
|
end
|
69
66
|
else
|
70
67
|
begin
|
68
|
+
puts '프록시 연결합니다.......'.magenta
|
69
|
+
puts '프록시 연결시 프록시 서버에 의해 인터넷속도가 낮아질수있어.......'.magenta
|
70
|
+
puts '원활한 작업이 되지않을수있습니다.......'.magenta
|
71
71
|
Selenium::WebDriver::Chrome::Service.driver_path = './chromedriver.exe'
|
72
|
-
# profile = Selenium::WebDriver::Chrome::Profile.new
|
73
|
-
# profile['network.proxy.type'] = 1
|
74
|
-
# profile['network.proxy.http'] = proxy.split(':')[0]
|
75
|
-
# profile['network.proxy.http_port'] = proxy.split(':')[1].to_i
|
76
|
-
# options = Selenium::WebDriver::Chrome::Options.new
|
77
|
-
# options.profile = profile
|
78
72
|
options = Selenium::WebDriver::Chrome::Options.new
|
79
73
|
options.add_argument '--proxy-server='+proxy.to_s.force_encoding('utf-8').to_s
|
74
|
+
options.add_extension('./crx/free.crx')
|
80
75
|
options.add_extension('./crx/app.crx')
|
81
76
|
options.page_load_strategy = :normal
|
82
77
|
options.timeouts = {page_load: 20_000}
|
83
|
-
options.add_argument('--disable-blink-features=AutomationControlled')
|
84
|
-
options.add_argument('--disable-popup-blocking')
|
85
|
-
options.add_argument('--dns-prefetch-disable')
|
86
|
-
options.add_argument('--disable-dev-shm-usage')
|
87
|
-
options.add_argument('--disable-software-rasterizer')
|
88
|
-
options.add_argument('--ignore-certificate-errors')
|
89
|
-
options.add_argument('--disable-gpu') # GPU가속 끄기
|
90
|
-
options.excludeSwitches('enable-automation') #자동화된 테스트...제거
|
91
|
-
options.add_argument('user-agent=Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.100 Safari/537.36') # user-agent 위조
|
92
78
|
options.add_argument('--start-maximized')
|
93
|
-
options.add_argument('
|
94
|
-
|
95
|
-
options.add_argument('--
|
96
|
-
options.add_argument('--
|
97
|
-
options.add_argument('--
|
98
|
-
|
99
|
-
options.add_argument('--disable-
|
100
|
-
options.add_argument('--
|
101
|
-
options.add_argument('--disable-
|
79
|
+
options.add_argument('user-agent=Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.6613.85 Safari/537.36') # user-agent 위조
|
80
|
+
|
81
|
+
#options.add_argument('--disable-blink-features=AutomationControlled')
|
82
|
+
#options.add_argument('--disable-popup-blocking')
|
83
|
+
#options.add_argument('--dns-prefetch-disable')
|
84
|
+
#options.add_argument('--disable-dev-shm-usage')
|
85
|
+
#options.add_argument('--disable-software-rasterizer')
|
86
|
+
#options.add_argument('--ignore-certificate-errors')
|
87
|
+
#options.add_argument('--disable-gpu') # GPU가속 끄기
|
88
|
+
#options.excludeSwitches('enable-automation') #자동화된 테스트...제거
|
89
|
+
#options.add_argument('--disable-web-security')
|
90
|
+
#options.add_argument('--allow-running-insecure-content')
|
91
|
+
#options.add_argument('--ignore-certificate-errors')
|
92
|
+
#options.add_argument('--allow-insecure-localhost')
|
93
|
+
#options.add_argument('--no-sandbox')
|
94
|
+
#options.add_argument('--disable-translate')
|
95
|
+
#options.add_argument('--disable-extensions-file-access-check')
|
96
|
+
#options.add_argument('--disable-impl-side-painting')
|
102
97
|
@driver = Selenium::WebDriver.for(:chrome, capabilities: options)
|
103
98
|
rescue => e
|
104
99
|
puts e
|
105
100
|
puts 'proxy error...'
|
106
101
|
begin
|
107
102
|
Selenium::WebDriver::Chrome::Service.driver_path = './chromedriver.exe'
|
103
|
+
options.add_extension('./crx/free.crx')
|
108
104
|
options.add_extension('./crx/app.crx')
|
109
105
|
options.page_load_strategy = :normal
|
110
106
|
options.timeouts = {page_load: 20_000}
|
111
|
-
options.add_argument('--disable-blink-features=AutomationControlled')
|
112
|
-
options.add_argument('--disable-popup-blocking')
|
113
|
-
options.add_argument('--dns-prefetch-disable')
|
114
|
-
options.add_argument('--disable-dev-shm-usage')
|
115
|
-
options.add_argument('--disable-software-rasterizer')
|
116
|
-
options.add_argument('--ignore-certificate-errors')
|
117
|
-
options.add_argument('--disable-gpu') # GPU가속 끄기
|
118
|
-
options.excludeSwitches('enable-automation') #자동화된 테스트...제거
|
119
|
-
options.add_argument('user-agent=Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.100 Safari/537.36') # user-agent 위조
|
120
107
|
options.add_argument('--start-maximized')
|
121
|
-
options.add_argument('
|
122
|
-
|
123
|
-
options.add_argument('--
|
124
|
-
options.add_argument('--
|
125
|
-
options.add_argument('--
|
126
|
-
|
127
|
-
options.add_argument('--disable-
|
128
|
-
options.add_argument('--
|
129
|
-
options.add_argument('--disable-
|
108
|
+
options.add_argument('user-agent=Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.6613.85 Safari/537.36') # user-agent 위조
|
109
|
+
|
110
|
+
#options.add_argument('--disable-blink-features=AutomationControlled')
|
111
|
+
#options.add_argument('--disable-popup-blocking')
|
112
|
+
#options.add_argument('--dns-prefetch-disable')
|
113
|
+
#options.add_argument('--disable-dev-shm-usage')
|
114
|
+
#options.add_argument('--disable-software-rasterizer')
|
115
|
+
#options.add_argument('--ignore-certificate-errors')
|
116
|
+
#options.add_argument('--disable-gpu') # GPU가속 끄기
|
117
|
+
#options.excludeSwitches('enable-automation') #자동화된 테스트...제거
|
118
|
+
#options.add_argument('--disable-web-security')
|
119
|
+
#options.add_argument('--allow-running-insecure-content')
|
120
|
+
#options.add_argument('--ignore-certificate-errors')
|
121
|
+
#options.add_argument('--allow-insecure-localhost')
|
122
|
+
#options.add_argument('--no-sandbox')
|
123
|
+
#options.add_argument('--disable-translate')
|
124
|
+
#options.add_argument('--disable-extensions-file-access-check')
|
125
|
+
#options.add_argument('--disable-impl-side-painting')
|
130
126
|
@driver = Selenium::WebDriver.for(:chrome, capabilities: options)
|
131
127
|
rescue
|
132
128
|
@driver = Selenium::WebDriver.for(:chrome, capabilities: options)
|
@@ -3143,6 +3139,8 @@ post_url = option['post_url'].to_s
|
|
3143
3139
|
rescue
|
3144
3140
|
end
|
3145
3141
|
|
3142
|
+
|
3143
|
+
|
3146
3144
|
begin
|
3147
3145
|
# 요소 찾기 타임아웃을 10초로 설정
|
3148
3146
|
wait = Selenium::WebDriver::Wait.new(:timeout => 20)
|
@@ -3168,6 +3166,25 @@ post_url = option['post_url'].to_s
|
|
3168
3166
|
end
|
3169
3167
|
end
|
3170
3168
|
|
3169
|
+
|
3170
|
+
begin
|
3171
|
+
sleep(1)
|
3172
|
+
puts '-[√] 글쓰기 버튼 클릭이 필수인지 탐색합니다.......'.green
|
3173
|
+
@driver.find_element(:xpath, '//*[@class="btn btn-primary btn-sm float_r"]').send_keys()
|
3174
|
+
sleep(2)
|
3175
|
+
@driver.find_element(:xpath, '//*[@class="btn btn-primary btn-sm float_r"]').click
|
3176
|
+
sleep(3)
|
3177
|
+
rescue
|
3178
|
+
begin
|
3179
|
+
@driver.find_element(:xpath, '//*[@class="fa fa-pencil"]').send_keys()
|
3180
|
+
sleep(2)
|
3181
|
+
@driver.find_element(:xpath, '//*[@class="fa fa-pencil"]').click
|
3182
|
+
sleep(3)
|
3183
|
+
rescue
|
3184
|
+
puts '-[√] 글쓰기 버튼 클릭이 필수가 아닙니다.......'.green
|
3185
|
+
end
|
3186
|
+
end
|
3187
|
+
|
3171
3188
|
sleep(1)
|
3172
3189
|
|
3173
3190
|
##캡챠 해제 입력 코드 부분─────────────────────────────────────────────────────────────────────>
|
@@ -7327,10 +7344,9 @@ class Wordpress
|
|
7327
7344
|
##
|
7328
7345
|
option['proxy'] = ''
|
7329
7346
|
if @data['포스트설정']['프록시'].checked?
|
7330
|
-
if table[
|
7331
|
-
option['proxy'] = @data['포스트설정']['프록시리스트'].sample.to_s
|
7332
|
-
else
|
7347
|
+
if table[8].to_i > table[10].to_i
|
7333
7348
|
option['proxy'] = @data['포스트설정']['프록시리스트'].sample.to_s
|
7349
|
+
|
7334
7350
|
end
|
7335
7351
|
end
|
7336
7352
|
|
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.37
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- soonje
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-08-
|
11
|
+
date: 2024-08-28 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: File to Clipboard gem
|
14
14
|
email: rnjstnswp123@naver.com
|