nblog_zon 0.0.62 → 0.0.65
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/nblog_zon.rb +29 -6
- 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: bcc7a7541d0ac238740354075db673c8fc6e68fc43cd00db51b3ab789fc27768
|
4
|
+
data.tar.gz: 1a6fb7850fb2706b315b482ab9d8836e154c26e8d5c7d9d07f2c1ac2edf56460
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7f4886d47d41dfaefb201f1577133b89e5556480cabbd341bb2db99498d1a0d32d2df12feb1ed2bc8debf326b634955da4e91e2f90d2313626ad450bb929087d
|
7
|
+
data.tar.gz: b2de3ef559cac1acc6bf58cafc6d553f0dea406cd8e671070b64302f6c626aa8d9d8936eed1bb9907013c2a13213cde19d3ead3fd29bcdc4292edeeefbbff51b
|
data/lib/nblog_zon.rb
CHANGED
@@ -230,9 +230,17 @@ class Naver
|
|
230
230
|
options.add_argument('--disable-gpu')
|
231
231
|
options.add_argument('--remote-debugging-port=9222')
|
232
232
|
options.add_argument('user-data-dir=C:/naver_cookie/' + user_id)
|
233
|
-
|
234
|
-
|
235
|
-
|
233
|
+
# 'capabilities'과 'options' 배열로 설정
|
234
|
+
capabilities = Selenium::WebDriver::Remote::Capabilities.chrome
|
235
|
+
capabilities["goog:chromeOptions"] = options.as_json
|
236
|
+
|
237
|
+
# Selenium 4에서는 'capabilities'만 사용하는 방식
|
238
|
+
@driver = Selenium::WebDriver.for(:chrome, capabilities: [capabilities, options])
|
239
|
+
|
240
|
+
@driver.execute_script("Object.defineProperty(navigator, 'webdriver', {get: function(){ return false; }});") # 셀레니움 감지 방지
|
241
|
+
|
242
|
+
rescue => e
|
243
|
+
@driver = Selenium::WebDriver.for(:chrome, capabilities: [capabilities, options])
|
236
244
|
end
|
237
245
|
else
|
238
246
|
begin
|
@@ -248,7 +256,14 @@ class Naver
|
|
248
256
|
options.add_argument('--disable-gpu')
|
249
257
|
options.add_argument('--remote-debugging-port=9222')
|
250
258
|
options.add_argument('user-data-dir=C:/naver_cookie/' + user_id)
|
251
|
-
|
259
|
+
# 'capabilities'과 'options' 배열로 설정
|
260
|
+
capabilities = Selenium::WebDriver::Remote::Capabilities.chrome
|
261
|
+
capabilities["goog:chromeOptions"] = options.as_json
|
262
|
+
|
263
|
+
# Selenium 4에서는 'capabilities'만 사용하는 방식
|
264
|
+
@driver = Selenium::WebDriver.for(:chrome, capabilities: [capabilities, options])
|
265
|
+
|
266
|
+
@driver.execute_script("Object.defineProperty(navigator, 'webdriver', {get: function(){ return false; }});") # 셀레니움 감지 방지
|
252
267
|
rescue => e
|
253
268
|
puts e
|
254
269
|
puts 'proxy error...'
|
@@ -264,9 +279,16 @@ class Naver
|
|
264
279
|
options.add_argument('--disable-gpu')
|
265
280
|
options.add_argument('--remote-debugging-port=9222')
|
266
281
|
options.add_argument('user-data-dir=C:/naver_cookie/' + user_id)
|
267
|
-
|
282
|
+
# 'capabilities'과 'options' 배열로 설정
|
283
|
+
capabilities = Selenium::WebDriver::Remote::Capabilities.chrome
|
284
|
+
capabilities["goog:chromeOptions"] = options.as_json
|
285
|
+
|
286
|
+
# Selenium 4에서는 'capabilities'만 사용하는 방식
|
287
|
+
@driver = Selenium::WebDriver.for(:chrome, capabilities: [capabilities, options])
|
288
|
+
|
289
|
+
@driver.execute_script("Object.defineProperty(navigator, 'webdriver', {get: function(){ return false; }});") # 셀레니움 감지 방지
|
268
290
|
rescue
|
269
|
-
@driver = Selenium::WebDriver.for(:chrome,
|
291
|
+
@driver = Selenium::WebDriver.for(:chrome, capabilities: [capabilities, options])
|
270
292
|
end
|
271
293
|
end
|
272
294
|
end
|
@@ -275,6 +297,7 @@ class Naver
|
|
275
297
|
|
276
298
|
|
277
299
|
|
300
|
+
|
278
301
|
def login(user_id, user_pw, proxy)
|
279
302
|
@user_id = user_id
|
280
303
|
@user_id11 = user_id
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: nblog_zon
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.65
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- zon
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-02-
|
11
|
+
date: 2025-02-10 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: File to Clipboard gem
|
14
14
|
email: rnjstnswp123@naver.com
|