posting_zon 0.0.11 → 0.0.17
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_zon.rb +84 -70
- 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: fa2533bb6288331d2e9f17bd3d42e197b0d65bbdff799764aff55aae382983e5
|
4
|
+
data.tar.gz: 14557a4859bb61806f99018823ea7ed81e91a2865735e94b762a152ab62598e0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d14a0bfee39a1eaa4cf68ade7c3baac863ea5d5d4778461cb01ef9557c5ff445f239da379a07b7ca7df9b24304bfb336156a714b1b9d6ebbba893585452fa7d7
|
7
|
+
data.tar.gz: fe2be34f9dc2633fb2ea22e422a14134972fb704d61c5aa5ffd7471a901e40f634c345e710e59b88965f5c7f0659b4bdb504bfe681ee8704952dadfd5be59e82
|
data/lib/posting_zon.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,104 +34,113 @@ 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
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
#
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
#options.
|
57
|
-
|
58
|
-
|
59
|
-
#
|
60
|
-
|
61
|
-
|
62
|
-
|
45
|
+
options.add_argument('--disable-blink-features=AutomationControlled') #자동화된 환경에서 실행되는 것을 감지하는 기능을 비활성화합니다.
|
46
|
+
options.add_argument('--ignore-certificate-errors') #SSL 인증서 오류를 무시하도록 설정합니다
|
47
|
+
options.add_argument('--disable-web-security') #웹 보안을 비활성화합니다
|
48
|
+
options.add_argument('--allow-running-insecure-content') #HTTPS 사이트에서 HTTP 컨텐츠를 실행할 수 있도록 허용합니다.
|
49
|
+
options.add_argument('--no-sandbox') #Chrome에서 샌드박스 모드를 비활성화합니다.
|
50
|
+
|
51
|
+
# 자동화된 테스트 제거
|
52
|
+
options.exclude_switches = ['enable-automation']
|
53
|
+
|
54
|
+
options.add_preference("profile.password_manager_enabled", false) # 비밀번호 관리자 비활성화
|
55
|
+
options.add_preference("credentials_enable_service", false) # 비밀번호 저장 기능 비활성화
|
56
|
+
#options.add_preference("profile.managed_default_content_settings.cookies", 2) # 쿠키 관련 팝업 차단
|
57
|
+
options.add_preference("profile.default_content_setting_values.notifications", 2) # 알림 차단
|
58
|
+
options.add_argument("--disable-save-password-bubble") # 비밀번호 저장 팝업 차단
|
59
|
+
# `capabilities` 사용
|
60
|
+
capabilities = [options]
|
61
|
+
|
62
|
+
# 드라이버 초기화 (capabilities 사용)
|
63
|
+
@driver = Selenium::WebDriver.for(:chrome, capabilities: capabilities)
|
64
|
+
|
63
65
|
rescue
|
64
|
-
|
66
|
+
# `capabilities` 사용
|
67
|
+
capabilities = [options]
|
68
|
+
|
69
|
+
# 드라이버 초기화 (capabilities 사용)
|
70
|
+
@driver = Selenium::WebDriver.for(:chrome, capabilities: capabilities)
|
65
71
|
end
|
66
72
|
else
|
67
73
|
begin
|
68
74
|
puts '프록시 연결합니다.......'.magenta
|
69
75
|
puts '프록시 연결시 프록시 서버에 의해 인터넷속도가 낮아질수있어.......'.magenta
|
70
76
|
puts '원활한 작업이 되지않을수있습니다.......'.magenta
|
71
|
-
Selenium::WebDriver::Chrome::Service.driver_path = './chromedriver.exe'
|
77
|
+
#Selenium::WebDriver::Chrome::Service.driver_path = './chromedriver.exe'
|
72
78
|
options = Selenium::WebDriver::Chrome::Options.new
|
73
79
|
options.add_argument '--proxy-server='+proxy.to_s.force_encoding('utf-8').to_s
|
74
80
|
options.add_extension('./crx/free.crx')
|
75
81
|
options.add_extension('./crx/app.crx')
|
76
|
-
|
77
|
-
options.timeouts = {page_load: 20_000}
|
82
|
+
|
78
83
|
options.add_argument('--start-maximized')
|
79
84
|
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 위조
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
#
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
#options.
|
92
|
-
|
93
|
-
|
94
|
-
#
|
95
|
-
|
96
|
-
|
97
|
-
|
85
|
+
options.add_argument('--disable-blink-features=AutomationControlled') #자동화된 환경에서 실행되는 것을 감지하는 기능을 비활성화합니다.
|
86
|
+
options.add_argument('--ignore-certificate-errors') #SSL 인증서 오류를 무시하도록 설정합니다
|
87
|
+
options.add_argument('--disable-web-security') #웹 보안을 비활성화합니다
|
88
|
+
options.add_argument('--allow-running-insecure-content') #HTTPS 사이트에서 HTTP 컨텐츠를 실행할 수 있도록 허용합니다.
|
89
|
+
options.add_argument('--no-sandbox') #Chrome에서 샌드박스 모드를 비활성화합니다.
|
90
|
+
|
91
|
+
# 자동화된 테스트 제거
|
92
|
+
options.exclude_switches = ['enable-automation']
|
93
|
+
|
94
|
+
options.add_preference("profile.password_manager_enabled", false) # 비밀번호 관리자 비활성화
|
95
|
+
options.add_preference("credentials_enable_service", false) # 비밀번호 저장 기능 비활성화
|
96
|
+
#options.add_preference("profile.managed_default_content_settings.cookies", 2) # 쿠키 관련 팝업 차단
|
97
|
+
options.add_preference("profile.default_content_setting_values.notifications", 2) # 알림 차단
|
98
|
+
options.add_argument("--disable-save-password-bubble") # 비밀번호 저장 팝업 차단
|
99
|
+
# `capabilities` 사용
|
100
|
+
capabilities = [options]
|
101
|
+
|
102
|
+
# 드라이버 초기화 (capabilities 사용)
|
103
|
+
@driver = Selenium::WebDriver.for(:chrome, capabilities: capabilities)
|
98
104
|
rescue => e
|
99
105
|
puts e
|
100
106
|
puts 'proxy error...'
|
101
107
|
begin
|
102
|
-
Selenium::WebDriver::Chrome::Service.driver_path = './chromedriver.exe'
|
108
|
+
#Selenium::WebDriver::Chrome::Service.driver_path = './chromedriver.exe'
|
103
109
|
options.add_extension('./crx/free.crx')
|
104
110
|
options.add_extension('./crx/app.crx')
|
105
|
-
|
106
|
-
options.timeouts = {page_load: 20_000}
|
111
|
+
|
107
112
|
options.add_argument('--start-maximized')
|
108
113
|
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 위조
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
#options.
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
114
|
+
options.add_argument('--disable-blink-features=AutomationControlled') #자동화된 환경에서 실행되는 것을 감지하는 기능을 비활성화합니다.
|
115
|
+
options.add_argument('--ignore-certificate-errors') #SSL 인증서 오류를 무시하도록 설정합니다
|
116
|
+
options.add_argument('--disable-web-security') #웹 보안을 비활성화합니다
|
117
|
+
options.add_argument('--allow-running-insecure-content') #HTTPS 사이트에서 HTTP 컨텐츠를 실행할 수 있도록 허용합니다.
|
118
|
+
options.add_argument('--no-sandbox') #Chrome에서 샌드박스 모드를 비활성화합니다.
|
119
|
+
|
120
|
+
# 자동화된 테스트 제거
|
121
|
+
options.exclude_switches = ['enable-automation']
|
122
|
+
|
123
|
+
options.add_preference("profile.password_manager_enabled", false) # 비밀번호 관리자 비활성화
|
124
|
+
options.add_preference("credentials_enable_service", false) # 비밀번호 저장 기능 비활성화
|
125
|
+
#options.add_preference("profile.managed_default_content_settings.cookies", 2) # 쿠키 관련 팝업 차단
|
126
|
+
options.add_preference("profile.default_content_setting_values.notifications", 2) # 알림 차단
|
127
|
+
options.add_argument("--disable-save-password-bubble") # 비밀번호 저장 팝업 차단
|
128
|
+
# `capabilities` 사용
|
129
|
+
capabilities = [options]
|
130
|
+
|
131
|
+
# 드라이버 초기화 (capabilities 사용)
|
132
|
+
@driver = Selenium::WebDriver.for(:chrome, capabilities: capabilities)
|
127
133
|
rescue
|
128
|
-
|
134
|
+
# `capabilities` 사용
|
135
|
+
capabilities = [options]
|
136
|
+
|
137
|
+
# 드라이버 초기화 (capabilities 사용)
|
138
|
+
@driver = Selenium::WebDriver.for(:chrome, capabilities: capabilities)
|
129
139
|
end
|
130
140
|
end
|
131
141
|
end
|
132
142
|
end
|
133
143
|
|
134
|
-
|
135
144
|
|
136
145
|
|
137
146
|
def login(proxy)
|
@@ -8639,10 +8648,15 @@ class Wordpress
|
|
8639
8648
|
|
8640
8649
|
@captcha_key = captcha_key
|
8641
8650
|
begin
|
8642
|
-
|
8643
|
-
|
8651
|
+
capabilities = [options]
|
8652
|
+
|
8653
|
+
# 드라이버 초기화 (capabilities 사용)
|
8654
|
+
@driver = Selenium::WebDriver.for(:chrome, capabilities: capabilities)
|
8644
8655
|
rescue
|
8645
|
-
|
8656
|
+
capabilities = [options]
|
8657
|
+
|
8658
|
+
# 드라이버 초기화 (capabilities 사용)
|
8659
|
+
@driver = Selenium::WebDriver.for(:chrome, capabilities: capabilities)
|
8646
8660
|
end
|
8647
8661
|
end
|
8648
8662
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: posting_zon
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.17
|
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: posting app
|
14
14
|
email: mymin26@naver.com
|