cafe_buy_duo 0.0.50 → 0.0.51
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_duo.rb +36 -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: 5190146a15ac1b0efb060a051aaed921593c9cb7b40a131f3316ecd15c994bd4
|
4
|
+
data.tar.gz: 6923fea1091b14ad9e728be5269ac4b317283913069e01e31ad72556a0160552
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ef0b0967d98c3b9c0123ed516bd19a72e4e9ece8e1ca003a3b5fc6d7af1d4a4968e6a11efff3167fcc4795f24a8de7f04ae3bacd3aae94fb3b2d08323ebd0f15
|
7
|
+
data.tar.gz: 42e034f833d5f14dc4a2aea963bd84128ef933488d24df5af5564c146d3e4a5c01cabe3a932cd0db51bd4d68293d8e236c10f420726afc8c485044acb2d93e8d
|
data/lib/cafe_buy_duo.rb
CHANGED
@@ -235,9 +235,19 @@ 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
|
+
options.add_argument('--disable-blink-features=AutomationControlled') # JavaScript로 navigator.webdriver 숨기기
|
239
|
+
|
240
|
+
# 'capabilities'과 'options' 배열로 설정
|
241
|
+
capabilities = Selenium::WebDriver::Remote::Capabilities.chrome
|
242
|
+
capabilities["goog:chromeOptions"] = options.as_json
|
243
|
+
|
244
|
+
# Selenium 4에서는 'capabilities'만 사용하는 방식
|
245
|
+
@driver = Selenium::WebDriver.for(:chrome, capabilities: [capabilities, options])
|
246
|
+
|
247
|
+
@driver.execute_script("Object.defineProperty(navigator, 'webdriver', {get: function(){ return false; }});") # 셀레니움 감지 방지
|
248
|
+
|
249
|
+
rescue => e
|
250
|
+
@driver = Selenium::WebDriver.for(:chrome, capabilities: [capabilities, options])
|
241
251
|
end
|
242
252
|
else
|
243
253
|
begin
|
@@ -253,7 +263,17 @@ class Naver
|
|
253
263
|
options.add_argument('--disable-gpu')
|
254
264
|
options.add_argument('--remote-debugging-port=9222')
|
255
265
|
options.add_argument('user-data-dir=C:/naver_cookie/' + user_id)
|
256
|
-
|
266
|
+
|
267
|
+
options.add_argument('--disable-blink-features=AutomationControlled') # JavaScript로 navigator.webdriver 숨기기
|
268
|
+
|
269
|
+
# 'capabilities'과 'options' 배열로 설정
|
270
|
+
capabilities = Selenium::WebDriver::Remote::Capabilities.chrome
|
271
|
+
capabilities["goog:chromeOptions"] = options.as_json
|
272
|
+
|
273
|
+
# Selenium 4에서는 'capabilities'만 사용하는 방식
|
274
|
+
@driver = Selenium::WebDriver.for(:chrome, capabilities: [capabilities, options])
|
275
|
+
|
276
|
+
@driver.execute_script("Object.defineProperty(navigator, 'webdriver', {get: function(){ return false; }});") # 셀레니움 감지 방지
|
257
277
|
rescue => e
|
258
278
|
puts e
|
259
279
|
puts 'proxy error...'
|
@@ -269,9 +289,18 @@ class Naver
|
|
269
289
|
options.add_argument('--disable-gpu')
|
270
290
|
options.add_argument('--remote-debugging-port=9222')
|
271
291
|
options.add_argument('user-data-dir=C:/naver_cookie/' + user_id)
|
272
|
-
|
292
|
+
options.add_argument('--disable-blink-features=AutomationControlled') # JavaScript로 navigator.webdriver 숨기기
|
293
|
+
|
294
|
+
# 'capabilities'과 'options' 배열로 설정
|
295
|
+
capabilities = Selenium::WebDriver::Remote::Capabilities.chrome
|
296
|
+
capabilities["goog:chromeOptions"] = options.as_json
|
297
|
+
|
298
|
+
# Selenium 4에서는 'capabilities'만 사용하는 방식
|
299
|
+
@driver = Selenium::WebDriver.for(:chrome, capabilities: [capabilities, options])
|
300
|
+
|
301
|
+
@driver.execute_script("Object.defineProperty(navigator, 'webdriver', {get: function(){ return false; }});") # 셀레니움 감지 방지
|
273
302
|
rescue
|
274
|
-
@driver = Selenium::WebDriver.for(:chrome,
|
303
|
+
@driver = Selenium::WebDriver.for(:chrome, capabilities: [capabilities, options])
|
275
304
|
end
|
276
305
|
end
|
277
306
|
end
|
@@ -279,6 +308,7 @@ class Naver
|
|
279
308
|
|
280
309
|
|
281
310
|
|
311
|
+
|
282
312
|
def login(user_id, user_pw, proxy)
|
283
313
|
@user_id = user_id
|
284
314
|
@user_id11 = user_id
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cafe_buy_duo
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.51
|
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
|