posting_duo 0.0.13 → 0.0.15
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/posting_duo.rb +68 -79
- 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: ff482dbd87ff4dbf4573dd9b91c508f472d2c157e8fc19f2ec556341ed469519
|
4
|
+
data.tar.gz: 603e38712d43e0cd2332453ced12d141444f8ed7255b0d7870cdd86b341591c7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d8f4a4997c55b3cdf86687dfe9cff974363eff59faebf153c98425ca3269b062054e1bac46a751b73d134c2f4d77c11be74969c6895257d689b2dcbe3ec0d0cf
|
7
|
+
data.tar.gz: 1f221c7c73a3ef0b66a16d122cd4b5c1b9d45a77f78f810031383390548f0ca93b9ec0c75ce44ccf98b4b27c31eb1737739963eec0c0590a48baeeed3602a38f
|
data/lib/posting_duo.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
require 'glimmer-dsl-libui'
|
2
2
|
require 'selenium-webdriver'
|
3
|
-
|
3
|
+
require 'webdrivers'
|
4
4
|
require 'iconv'
|
5
5
|
require 'nokogiri'
|
6
6
|
require 'open-uri'
|
@@ -34,122 +34,111 @@ class Naver
|
|
34
34
|
def chrome_start(proxy)
|
35
35
|
if proxy == ''
|
36
36
|
begin
|
37
|
-
Selenium::WebDriver::Chrome::Service.driver_path = './chromedriver.exe'
|
37
|
+
#Selenium::WebDriver::Chrome::Service.driver_path = './chromedriver.exe'
|
38
|
+
|
38
39
|
options = Selenium::WebDriver::Chrome::Options.new #(options: {"excludeSwitches" => ["enable-automation"]}) #자동화된 테스트...제거(options: {"excludeSwitches" => ["enable-automation"]})
|
39
40
|
options.add_extension('./crx/free.crx')
|
40
41
|
options.add_extension('./crx/app.crx')
|
41
|
-
|
42
|
-
options.timeouts = {page_load: 20_000}
|
42
|
+
|
43
43
|
options.add_argument('--start-maximized')
|
44
44
|
options.add_argument('user-agent=Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.6723.59 Safari/537.36') # user-agent 위조
|
45
|
+
options.add_argument('--disable-blink-features=AutomationControlled') #자동화된 환경에서 실행되는 것을 감지하는 기능을 비활성화합니다.
|
46
|
+
options.add_argument('--ignore-certificate-errors') #SSL 인증서 오류를 무시하도록 설정합니다
|
47
|
+
options.excludeSwitches('--enable-automation') #자동화된 테스트...제거
|
48
|
+
options.add_argument('--disable-web-security') #웹 보안을 비활성화합니다
|
49
|
+
options.add_argument('--allow-running-insecure-content') #HTTPS 사이트에서 HTTP 컨텐츠를 실행할 수 있도록 허용합니다.
|
50
|
+
options.add_argument('--no-sandbox') #Chrome에서 샌드박스 모드를 비활성화합니다.
|
51
|
+
|
52
|
+
# 자동화된 테스트 제거
|
53
|
+
options.exclude_switches = ['enable-automation']
|
54
|
+
|
55
|
+
options.add_preference("profile.password_manager_enabled", false) # 비밀번호 관리자 비활성화
|
56
|
+
options.add_preference("credentials_enable_service", false) # 비밀번호 저장 기능 비활성화
|
57
|
+
#options.add_preference("profile.managed_default_content_settings.cookies", 2) # 쿠키 관련 팝업 차단
|
58
|
+
options.add_preference("profile.default_content_setting_values.notifications", 2) # 알림 차단
|
59
|
+
options.add_argument("--disable-save-password-bubble") # 비밀번호 저장 팝업 차단
|
45
60
|
# `capabilities` 사용
|
46
61
|
capabilities = [options]
|
47
62
|
|
48
63
|
# 드라이버 초기화 (capabilities 사용)
|
49
64
|
@driver = Selenium::WebDriver.for(:chrome, capabilities: capabilities)
|
50
|
-
|
51
|
-
#options.add_argument('--disable-popup-blocking')
|
52
|
-
#options.add_argument('--dns-prefetch-disable')
|
53
|
-
#options.add_argument('--disable-dev-shm-usage')
|
54
|
-
#options.add_argument('--disable-software-rasterizer')
|
55
|
-
#options.add_argument('--ignore-certificate-errors')
|
56
|
-
#options.add_argument('--disable-gpu') # GPU가속 끄기
|
57
|
-
#options.excludeSwitches('--enable-automation') #자동화된 테스트...제거
|
58
|
-
#options.add_argument('--disable-web-security')
|
59
|
-
#options.add_argument('--allow-running-insecure-content')
|
60
|
-
#options.add_argument('--ignore-certificate-errors')
|
61
|
-
#options.add_argument('--allow-insecure-localhost')
|
62
|
-
#options.add_argument('--no-sandbox')
|
63
|
-
#options.add_argument('--disable-translate')
|
64
|
-
#options.add_argument('--disable-extensions-file-access-check')
|
65
|
-
#options.add_argument('--disable-impl-side-painting')
|
66
|
-
#@driver = Selenium::WebDriver.for(:chrome, capabilities: options)
|
65
|
+
|
67
66
|
rescue
|
68
|
-
|
69
|
-
|
70
|
-
capabilities = [options]
|
67
|
+
# `capabilities` 사용
|
68
|
+
capabilities = [options]
|
71
69
|
|
72
|
-
|
73
|
-
|
70
|
+
# 드라이버 초기화 (capabilities 사용)
|
71
|
+
@driver = Selenium::WebDriver.for(:chrome, capabilities: capabilities)
|
74
72
|
end
|
75
73
|
else
|
76
74
|
begin
|
77
75
|
puts '프록시 연결합니다.......'.magenta
|
78
76
|
puts '프록시 연결시 프록시 서버에 의해 인터넷속도가 낮아질수있어.......'.magenta
|
79
77
|
puts '원활한 작업이 되지않을수있습니다.......'.magenta
|
80
|
-
Selenium::WebDriver::Chrome::Service.driver_path = './chromedriver.exe'
|
78
|
+
#Selenium::WebDriver::Chrome::Service.driver_path = './chromedriver.exe'
|
81
79
|
options = Selenium::WebDriver::Chrome::Options.new
|
82
80
|
options.add_argument '--proxy-server='+proxy.to_s.force_encoding('utf-8').to_s
|
83
81
|
options.add_extension('./crx/free.crx')
|
84
82
|
options.add_extension('./crx/app.crx')
|
85
|
-
|
86
|
-
options.timeouts = {page_load: 20_000}
|
83
|
+
|
87
84
|
options.add_argument('--start-maximized')
|
88
85
|
options.add_argument('user-agent=Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.6723.59 Safari/537.36') # user-agent 위조
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
#
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
#options.
|
102
|
-
|
103
|
-
|
104
|
-
#
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
# 드라이버 초기화 (capabilities 사용)
|
111
|
-
@driver = Selenium::WebDriver.for(:chrome, capabilities: capabilities)
|
86
|
+
options.add_argument('--disable-blink-features=AutomationControlled') #자동화된 환경에서 실행되는 것을 감지하는 기능을 비활성화합니다.
|
87
|
+
options.add_argument('--ignore-certificate-errors') #SSL 인증서 오류를 무시하도록 설정합니다
|
88
|
+
options.excludeSwitches('--enable-automation') #자동화된 테스트...제거
|
89
|
+
options.add_argument('--disable-web-security') #웹 보안을 비활성화합니다
|
90
|
+
options.add_argument('--allow-running-insecure-content') #HTTPS 사이트에서 HTTP 컨텐츠를 실행할 수 있도록 허용합니다.
|
91
|
+
options.add_argument('--no-sandbox') #Chrome에서 샌드박스 모드를 비활성화합니다.
|
92
|
+
|
93
|
+
# 자동화된 테스트 제거
|
94
|
+
options.exclude_switches = ['enable-automation']
|
95
|
+
|
96
|
+
options.add_preference("profile.password_manager_enabled", false) # 비밀번호 관리자 비활성화
|
97
|
+
options.add_preference("credentials_enable_service", false) # 비밀번호 저장 기능 비활성화
|
98
|
+
#options.add_preference("profile.managed_default_content_settings.cookies", 2) # 쿠키 관련 팝업 차단
|
99
|
+
options.add_preference("profile.default_content_setting_values.notifications", 2) # 알림 차단
|
100
|
+
options.add_argument("--disable-save-password-bubble") # 비밀번호 저장 팝업 차단
|
101
|
+
# `capabilities` 사용
|
102
|
+
capabilities = [options]
|
103
|
+
|
104
|
+
# 드라이버 초기화 (capabilities 사용)
|
105
|
+
@driver = Selenium::WebDriver.for(:chrome, capabilities: capabilities)
|
112
106
|
rescue => e
|
113
107
|
puts e
|
114
108
|
puts 'proxy error...'
|
115
109
|
begin
|
116
|
-
Selenium::WebDriver::Chrome::Service.driver_path = './chromedriver.exe'
|
110
|
+
#Selenium::WebDriver::Chrome::Service.driver_path = './chromedriver.exe'
|
117
111
|
options.add_extension('./crx/free.crx')
|
118
112
|
options.add_extension('./crx/app.crx')
|
119
|
-
|
120
|
-
options.timeouts = {page_load: 20_000}
|
113
|
+
|
121
114
|
options.add_argument('--start-maximized')
|
122
115
|
options.add_argument('user-agent=Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.6723.59 Safari/537.36') # user-agent 위조
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
#options.
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
#options.add_argument('--disable-impl-side-painting')
|
140
|
-
#@driver = Selenium::WebDriver.for(:chrome, capabilities: options)
|
141
|
-
# `capabilities` 사용
|
116
|
+
options.add_argument('--disable-blink-features=AutomationControlled') #자동화된 환경에서 실행되는 것을 감지하는 기능을 비활성화합니다.
|
117
|
+
options.add_argument('--ignore-certificate-errors') #SSL 인증서 오류를 무시하도록 설정합니다
|
118
|
+
options.excludeSwitches('--enable-automation') #자동화된 테스트...제거
|
119
|
+
options.add_argument('--disable-web-security') #웹 보안을 비활성화합니다
|
120
|
+
options.add_argument('--allow-running-insecure-content') #HTTPS 사이트에서 HTTP 컨텐츠를 실행할 수 있도록 허용합니다.
|
121
|
+
options.add_argument('--no-sandbox') #Chrome에서 샌드박스 모드를 비활성화합니다.
|
122
|
+
|
123
|
+
# 자동화된 테스트 제거
|
124
|
+
options.exclude_switches = ['enable-automation']
|
125
|
+
|
126
|
+
options.add_preference("profile.password_manager_enabled", false) # 비밀번호 관리자 비활성화
|
127
|
+
options.add_preference("credentials_enable_service", false) # 비밀번호 저장 기능 비활성화
|
128
|
+
#options.add_preference("profile.managed_default_content_settings.cookies", 2) # 쿠키 관련 팝업 차단
|
129
|
+
options.add_preference("profile.default_content_setting_values.notifications", 2) # 알림 차단
|
130
|
+
options.add_argument("--disable-save-password-bubble") # 비밀번호 저장 팝업 차단
|
131
|
+
# `capabilities` 사용
|
142
132
|
capabilities = [options]
|
143
133
|
|
144
134
|
# 드라이버 초기화 (capabilities 사용)
|
145
135
|
@driver = Selenium::WebDriver.for(:chrome, capabilities: capabilities)
|
146
136
|
rescue
|
147
|
-
|
148
|
-
|
149
|
-
capabilities = [options]
|
137
|
+
# `capabilities` 사용
|
138
|
+
capabilities = [options]
|
150
139
|
|
151
|
-
|
152
|
-
|
140
|
+
# 드라이버 초기화 (capabilities 사용)
|
141
|
+
@driver = Selenium::WebDriver.for(:chrome, capabilities: capabilities)
|
153
142
|
end
|
154
143
|
end
|
155
144
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: posting_duo
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.15
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- zon
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2025-01-09 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: File to Clipboard gem
|
14
14
|
email: mymin26@naver.com
|