cafe_buy 0.0.50 → 0.0.52
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/cafe_buy.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: efbc4b4e45298013009cd3a0b31195f99b600463d5279a52bebb685cc7e2564b
|
4
|
+
data.tar.gz: f021766606e2257cd0a530fbcda82cf350be7de39a2c1d8cf2d20a000596dab3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2bc97468512d281716c3eaece0f6087f9ac61e3e823a2ade963e793fc369a6dbc7f537e8536f4b6888537d8f9bcaf0863927104e9e692cf0090244895c18f3d8
|
7
|
+
data.tar.gz: 15134f6e2d2e0a0b96c522a8303e07c5db49d0ef32b9a5a28bb4957674bfba4646ed300452a958ff65618bb8fc0a18bd699fe4d59588419c8f98b22dbc9cae92
|
data/lib/cafe_buy.rb
CHANGED
@@ -235,9 +235,17 @@ class Naver
|
|
235
235
|
options.add_argument('--disable-gpu')
|
236
236
|
options.add_argument('--remote-debugging-port=9222')
|
237
237
|
options.add_argument('user-data-dir=C:/naver_cookie/' + user_id)
|
238
|
-
|
239
|
-
|
240
|
-
|
238
|
+
# 'capabilities'과 'options' 배열로 설정
|
239
|
+
capabilities = Selenium::WebDriver::Remote::Capabilities.chrome
|
240
|
+
capabilities["goog:chromeOptions"] = options.as_json
|
241
|
+
|
242
|
+
# Selenium 4에서는 'capabilities'만 사용하는 방식
|
243
|
+
@driver = Selenium::WebDriver.for(:chrome, capabilities: [capabilities, options])
|
244
|
+
|
245
|
+
@driver.execute_script("Object.defineProperty(navigator, 'webdriver', {get: function(){ return false; }});") # 셀레니움 감지 방지
|
246
|
+
|
247
|
+
rescue => e
|
248
|
+
@driver = Selenium::WebDriver.for(:chrome, capabilities: [capabilities, options])
|
241
249
|
end
|
242
250
|
else
|
243
251
|
begin
|
@@ -253,7 +261,14 @@ class Naver
|
|
253
261
|
options.add_argument('--disable-gpu')
|
254
262
|
options.add_argument('--remote-debugging-port=9222')
|
255
263
|
options.add_argument('user-data-dir=C:/naver_cookie/' + user_id)
|
256
|
-
|
264
|
+
# 'capabilities'과 'options' 배열로 설정
|
265
|
+
capabilities = Selenium::WebDriver::Remote::Capabilities.chrome
|
266
|
+
capabilities["goog:chromeOptions"] = options.as_json
|
267
|
+
|
268
|
+
# Selenium 4에서는 'capabilities'만 사용하는 방식
|
269
|
+
@driver = Selenium::WebDriver.for(:chrome, capabilities: [capabilities, options])
|
270
|
+
|
271
|
+
@driver.execute_script("Object.defineProperty(navigator, 'webdriver', {get: function(){ return false; }});") # 셀레니움 감지 방지
|
257
272
|
rescue => e
|
258
273
|
puts e
|
259
274
|
puts 'proxy error...'
|
@@ -269,9 +284,16 @@ class Naver
|
|
269
284
|
options.add_argument('--disable-gpu')
|
270
285
|
options.add_argument('--remote-debugging-port=9222')
|
271
286
|
options.add_argument('user-data-dir=C:/naver_cookie/' + user_id)
|
272
|
-
|
287
|
+
# 'capabilities'과 'options' 배열로 설정
|
288
|
+
capabilities = Selenium::WebDriver::Remote::Capabilities.chrome
|
289
|
+
capabilities["goog:chromeOptions"] = options.as_json
|
290
|
+
|
291
|
+
# Selenium 4에서는 'capabilities'만 사용하는 방식
|
292
|
+
@driver = Selenium::WebDriver.for(:chrome, capabilities: [capabilities, options])
|
293
|
+
|
294
|
+
@driver.execute_script("Object.defineProperty(navigator, 'webdriver', {get: function(){ return false; }});") # 셀레니움 감지 방지
|
273
295
|
rescue
|
274
|
-
@driver = Selenium::WebDriver.for(:chrome,
|
296
|
+
@driver = Selenium::WebDriver.for(:chrome, capabilities: [capabilities, options])
|
275
297
|
end
|
276
298
|
end
|
277
299
|
end
|
@@ -279,6 +301,7 @@ class Naver
|
|
279
301
|
|
280
302
|
|
281
303
|
|
304
|
+
|
282
305
|
def login(user_id, user_pw, proxy)
|
283
306
|
@user_id = user_id
|
284
307
|
@user_id11 = user_id
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cafe_buy
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.52
|
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: mymin26@naver.com
|