board_posting_duo 0.0.35 → 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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/board_posting_duo.rb +68 -67
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 89d56bcd000539d4799fb0d78b6645593fe8b585ce2bdc9745dcbc4a362b301a
4
- data.tar.gz: 0d9cbfbb276d7682399d28471157321a12188238971c843d61a56ccbaff74138
3
+ metadata.gz: c51ebcc6b46612e3170b6535d6974e04257a30c8c1e92cda382e3208996b7a60
4
+ data.tar.gz: fc755aa189221204e29475a29cbc0522e9528aeb9996ef749e77915a268bc8bb
5
5
  SHA512:
6
- metadata.gz: 02fad47e1ea6a57ad26764fb9f4dcd96e429c8f067d53d9baee872069aed58e6817ba3690775015175760914b6edeb2c5cf649517ba200fafeaafc8a8664a545
7
- data.tar.gz: 5f9672b2327f3bed08fede19e7f45c78f13e670418db655d83acfae978372c42aef8691e4c98acf818737a758fa74237418d3b4a2069921780ccd97ed1aec1d0
6
+ metadata.gz: dc6c72a751df83d0ac3ff6f21c582ce5c79341ec06c9509c913bf06a29a66b4ff37cce24a7483215ba72239daa8579947be9ccb958e11cac7a16f8f56d456ae6
7
+ data.tar.gz: 993ce2194843292a7caf1c123c91a9e27b86b8729bd7ff1b2964bb5a3466df4b79e322a768a74dc2decb39fdef61a3611b44ae01439bce47bac49ecb74d9e384
@@ -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('--disable-blink-features=AutomationControlled')
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('--disable-web-security')
94
- options.add_argument('--allow-running-insecure-content')
95
- options.add_argument('--ignore-certificate-errors')
96
- options.add_argument('--allow-insecure-localhost')
97
- options.add_argument('--no-sandbox')
98
-
99
- options.add_argument('--disable-translate')
100
- options.add_argument('--disable-extensions-file-access-check')
101
- options.add_argument('--disable-impl-side-painting')
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('--disable-web-security')
122
- options.add_argument('--allow-running-insecure-content')
123
- options.add_argument('--ignore-certificate-errors')
124
- options.add_argument('--allow-insecure-localhost')
125
- options.add_argument('--no-sandbox')
126
-
127
- options.add_argument('--disable-translate')
128
- options.add_argument('--disable-extensions-file-access-check')
129
- options.add_argument('--disable-impl-side-painting')
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)
@@ -3173,14 +3169,20 @@ post_url = option['post_url'].to_s
3173
3169
 
3174
3170
  begin
3175
3171
  sleep(1)
3176
-
3177
3172
  puts '-[√] 글쓰기 버튼 클릭이 필수인지 탐색합니다.......'.green
3178
3173
  @driver.find_element(:xpath, '//*[@class="btn btn-primary btn-sm float_r"]').send_keys()
3179
3174
  sleep(2)
3180
3175
  @driver.find_element(:xpath, '//*[@class="btn btn-primary btn-sm float_r"]').click
3181
3176
  sleep(3)
3182
3177
  rescue
3183
- puts '-[√] 글쓰기 버튼 클릭이 필수가 아닙니다.......'.green
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
3184
3186
  end
3185
3187
 
3186
3188
  sleep(1)
@@ -7342,10 +7344,9 @@ class Wordpress
7342
7344
  ##
7343
7345
  option['proxy'] = ''
7344
7346
  if @data['포스트설정']['프록시'].checked?
7345
- if table[6].to_i == 0
7346
- option['proxy'] = @data['포스트설정']['프록시리스트'].sample.to_s
7347
- else
7347
+ if table[8].to_i > table[10].to_i
7348
7348
  option['proxy'] = @data['포스트설정']['프록시리스트'].sample.to_s
7349
+
7349
7350
  end
7350
7351
  end
7351
7352
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: board_posting_duo
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.35
4
+ version: 0.0.37
5
5
  platform: ruby
6
6
  authors:
7
7
  - soonje