posting_duo 0.0.27 → 0.0.30
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 +91 -118
- 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: 20979e15cb7508d97f1b65bacb6853dcf27d12b9828e17923c6bf2340bc014de
|
4
|
+
data.tar.gz: dc3af1b58592d9c8db350887607733c678ec1d4508abc74a8509e697cedf03ff
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: daf48151576f6c7db028829d8df02b28473d060e4304a49b7819afcc7b36055c0b0029ddd2388afd980bc964133a08d782087dbfbf1525595209cb17c54ec48d
|
7
|
+
data.tar.gz: fd4f709c4f510d6e18caff42cf6885e86df0715225ff9b8d2f3f485f83cf7231bd68e419503bf9abb184e93eec5bbba2c3c70fddec27978edcfdf40bdba1d871
|
data/lib/posting_duo.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
require 'glimmer-dsl-libui'
|
2
2
|
require 'selenium-webdriver'
|
3
|
-
require 'webdrivers'
|
3
|
+
# require 'webdrivers'
|
4
4
|
require 'iconv'
|
5
5
|
require 'nokogiri'
|
6
6
|
require 'open-uri'
|
@@ -30,127 +30,100 @@ require 'watir'
|
|
30
30
|
#driver.find_element(:class_name, 'highlight-java')
|
31
31
|
|
32
32
|
class Naver
|
33
|
-
|
33
|
+
|
34
34
|
def chrome_start(proxy)
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
capabilities = [options]
|
125
|
-
@driver = Selenium::WebDriver.for(:chrome, capabilities: capabilities)
|
126
|
-
rescue => e
|
127
|
-
puts "Proxy error: #{e.message}"
|
128
|
-
# 예외 발생 시 수동으로 chromedriver 경로 설정
|
129
|
-
Selenium::WebDriver::Chrome::Service.driver_path = chromedriver_path
|
130
|
-
options.add_extension('./crx/free.crx')
|
131
|
-
options.add_extension('./crx/app.crx')
|
132
|
-
options.add_argument('--disable-gpu')
|
133
|
-
options.add_argument('--start-maximized')
|
134
|
-
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')
|
135
|
-
options.add_argument('--disable-blink-features=AutomationControlled')
|
136
|
-
options.add_argument('--ignore-certificate-errors')
|
137
|
-
options.add_argument('--disable-web-security')
|
138
|
-
options.add_argument('--allow-running-insecure-content')
|
139
|
-
options.add_argument('--no-sandbox')
|
140
|
-
|
141
|
-
options.exclude_switches = ['enable-automation']
|
142
|
-
options.add_preference("profile.password_manager_enabled", false)
|
143
|
-
options.add_preference("credentials_enable_service", false)
|
144
|
-
options.add_preference("profile.default_content_setting_values.notifications", 2)
|
145
|
-
options.add_argument("--disable-save-password-bubble")
|
146
|
-
|
147
|
-
capabilities = [options]
|
148
|
-
@driver = Selenium::WebDriver.for(:chrome, capabilities: capabilities)
|
35
|
+
if proxy == ''
|
36
|
+
begin
|
37
|
+
Selenium::WebDriver::Chrome::Service.driver_path = './chromedriver.exe'
|
38
|
+
options = Selenium::WebDriver::Chrome::Options.new #(options: {"excludeSwitches" => ["enable-automation"]}) #자동화된 테스트...제거(options: {"excludeSwitches" => ["enable-automation"]})
|
39
|
+
options.add_extension('./crx/free.crx')
|
40
|
+
options.add_extension('./crx/app.crx')
|
41
|
+
options.page_load_strategy = :normal
|
42
|
+
options.timeouts = {page_load: 20_000}
|
43
|
+
options.add_argument('--disable-gpu')
|
44
|
+
options.add_argument('--start-maximized')
|
45
|
+
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 위조
|
46
|
+
options.add_argument('--disable-blink-features=AutomationControlled') # 자동화된 환경에서 실행되는 것을 감지하는 기능을 비활성화합니다.
|
47
|
+
|
48
|
+
options.add_argument('--disable-web-security') # 웹 보안 비활성화
|
49
|
+
options.add_argument('--allow-running-insecure-content') # HTTPS 사이트에서 HTTP 컨텐츠 실행 허용
|
50
|
+
options.add_argument('--no-sandbox') # 샌드박스 모드 비활성화
|
51
|
+
|
52
|
+
options.exclude_switches = ['enable-automation'] # 자동화 테스트 제거
|
53
|
+
options.add_preference("profile.password_manager_enabled", false) # 비밀번호 관리자 비활성화
|
54
|
+
options.add_preference("credentials_enable_service", false) # 비밀번호 저장 기능 비활성화
|
55
|
+
options.add_preference("profile.default_content_setting_values.notifications", 2) # 알림 차단
|
56
|
+
options.add_argument("--disable-save-password-bubble") # 비밀번호 저장 팝업 차단
|
57
|
+
|
58
|
+
|
59
|
+
|
60
|
+
@driver = Selenium::WebDriver.for(:chrome, capabilities: options)
|
61
|
+
rescue
|
62
|
+
@driver = Selenium::WebDriver.for(:chrome, capabilities: options)
|
63
|
+
end
|
64
|
+
else
|
65
|
+
begin
|
66
|
+
puts '프록시 연결합니다.......'.magenta
|
67
|
+
puts '프록시 연결시 프록시 서버에 의해 인터넷속도가 낮아질수있어.......'.magenta
|
68
|
+
puts '원활한 작업이 되지않을수있습니다.......'.magenta
|
69
|
+
Selenium::WebDriver::Chrome::Service.driver_path = './chromedriver.exe'
|
70
|
+
options = Selenium::WebDriver::Chrome::Options.new
|
71
|
+
options.add_argument '--proxy-server='+proxy.to_s.force_encoding('utf-8').to_s
|
72
|
+
options.add_extension('./crx/free.crx')
|
73
|
+
options.add_extension('./crx/app.crx')
|
74
|
+
options.page_load_strategy = :normal
|
75
|
+
options.timeouts = {page_load: 20_000}
|
76
|
+
options.add_argument('--disable-gpu')
|
77
|
+
options.add_argument('--start-maximized')
|
78
|
+
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 위조
|
79
|
+
options.add_argument('--disable-blink-features=AutomationControlled') # 자동화된 환경에서 실행되는 것을 감지하는 기능을 비활성화합니다.
|
80
|
+
|
81
|
+
options.add_argument('--disable-web-security') # 웹 보안 비활성화
|
82
|
+
options.add_argument('--allow-running-insecure-content') # HTTPS 사이트에서 HTTP 컨텐츠 실행 허용
|
83
|
+
options.add_argument('--no-sandbox') # 샌드박스 모드 비활성화
|
84
|
+
|
85
|
+
options.exclude_switches = ['enable-automation'] # 자동화 테스트 제거
|
86
|
+
options.add_preference("profile.password_manager_enabled", false) # 비밀번호 관리자 비활성화
|
87
|
+
options.add_preference("credentials_enable_service", false) # 비밀번호 저장 기능 비활성화
|
88
|
+
options.add_preference("profile.default_content_setting_values.notifications", 2) # 알림 차단
|
89
|
+
options.add_argument("--disable-save-password-bubble") # 비밀번호 저장 팝업 차단
|
90
|
+
|
91
|
+
|
92
|
+
|
93
|
+
@driver = Selenium::WebDriver.for(:chrome, capabilities: options)
|
94
|
+
rescue => e
|
95
|
+
puts e
|
96
|
+
puts 'proxy error...'
|
97
|
+
begin
|
98
|
+
Selenium::WebDriver::Chrome::Service.driver_path = './chromedriver.exe'
|
99
|
+
options.add_extension('./crx/free.crx')
|
100
|
+
options.add_extension('./crx/app.crx')
|
101
|
+
options.page_load_strategy = :normal
|
102
|
+
options.timeouts = {page_load: 20_000}
|
103
|
+
options.add_argument('--disable-gpu')
|
104
|
+
options.add_argument('--start-maximized')
|
105
|
+
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 위조
|
106
|
+
options.add_argument('--disable-blink-features=AutomationControlled') # 자동화된 환경에서 실행되는 것을 감지하는 기능을 비활성화합니다.
|
107
|
+
|
108
|
+
options.add_argument('--disable-web-security') # 웹 보안 비활성화
|
109
|
+
options.add_argument('--allow-running-insecure-content') # HTTPS 사이트에서 HTTP 컨텐츠 실행 허용
|
110
|
+
options.add_argument('--no-sandbox') # 샌드박스 모드 비활성화
|
111
|
+
|
112
|
+
options.exclude_switches = ['enable-automation'] # 자동화 테스트 제거
|
113
|
+
options.add_preference("profile.password_manager_enabled", false) # 비밀번호 관리자 비활성화
|
114
|
+
options.add_preference("credentials_enable_service", false) # 비밀번호 저장 기능 비활성화
|
115
|
+
options.add_preference("profile.default_content_setting_values.notifications", 2) # 알림 차단
|
116
|
+
options.add_argument("--disable-save-password-bubble") # 비밀번호 저장 팝업 차단
|
117
|
+
|
118
|
+
|
119
|
+
@driver = Selenium::WebDriver.for(:chrome, capabilities: options)
|
120
|
+
rescue
|
121
|
+
@driver = Selenium::WebDriver.for(:chrome, capabilities: options)
|
122
|
+
end
|
123
|
+
end
|
149
124
|
end
|
150
|
-
end
|
151
125
|
end
|
152
126
|
|
153
|
-
|
154
127
|
|
155
128
|
|
156
129
|
def login(proxy)
|
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.30
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- zon
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-01-
|
11
|
+
date: 2025-01-21 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: File to Clipboard gem
|
14
14
|
email: mymin26@naver.com
|