cafe_buy 0.0.57 → 0.0.59
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 +41 -14
- 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: 16210ca19efe0143d45838d94b3bd87a3d36404c75c8bdd1085a707ea5dfd532
|
4
|
+
data.tar.gz: 06e45d7f45e7b68e00522de52ca390cae54607852f0c428f9b984cc0c6a45be1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c258f79cbcf47dfadd81dbac6fe22eb8416996626b4e75ee1b167f0322792d0bdb9f8bd87150cb04a140668d517d4394a1954420c17dd9297e61c2672913e4df
|
7
|
+
data.tar.gz: '02029fcd4e54fa67d1882e3a930f80f0b0df7cf9a64be86a99f9d17cb3e996b0286a32cb89bf3fe44bdcffa3cb9b61cdcc8a59467d8127e13e221a22d805692d'
|
data/lib/cafe_buy.rb
CHANGED
@@ -246,9 +246,13 @@ class Naver
|
|
246
246
|
naver_cookie_dir = "C:/naver_cookie"
|
247
247
|
FileUtils.mkdir_p(naver_cookie_dir) unless File.exist?(naver_cookie_dir)
|
248
248
|
if proxy == ''
|
249
|
-
|
249
|
+
|
250
|
+
system(%{"C:\\Program Files\\Google\\Chrome\\Application\\chrome.exe" https://naver.com/ --remote-debugging-port=9222 --user-data-dir=C:/naver_cookie/#{user_id} --no-first-run --no-default-browser-check --disable-sync})
|
251
|
+
|
250
252
|
else
|
251
|
-
|
253
|
+
|
254
|
+
system(%{"C:\\Program Files\\Google\\Chrome\\Application\\chrome.exe" https://naver.com/ --remote-debugging-port=9222 --user-data-dir=C:/naver_cookie/#{user_id} --proxy-server=#{proxy.to_s.force_encoding('utf-8').to_s} --no-first-run --no-default-browser-check --disable-sync})
|
255
|
+
|
252
256
|
end
|
253
257
|
end
|
254
258
|
def chrome_start(proxy, user_id)
|
@@ -260,6 +264,9 @@ class Naver
|
|
260
264
|
options = Selenium::WebDriver::Chrome::Options.new
|
261
265
|
options.add_argument('--no-first-run') # 자동 실행 시 나타나는 "첫 실행" 화면 방지
|
262
266
|
options.add_argument('--disable-extensions') # 확장 프로그램 초기화 화면 방지
|
267
|
+
options.add_argument('--disable-sync') # Chrome 동기화 비활성화
|
268
|
+
options.add_argument('--disable-popup-blocking') # 팝업 방지 (로그인 창이 뜨는 경우 대비)
|
269
|
+
options.add_argument('--no-default-browser-check')
|
263
270
|
options.page_load_strategy = :normal
|
264
271
|
options.timeouts = {page_load: 20_000}
|
265
272
|
options.page_load_strategy = 'none'
|
@@ -285,6 +292,9 @@ class Naver
|
|
285
292
|
options = Selenium::WebDriver::Chrome::Options.new
|
286
293
|
options.add_argument('--no-first-run') # 자동 실행 시 나타나는 "첫 실행" 화면 방지
|
287
294
|
options.add_argument('--disable-extensions') # 확장 프로그램 초기화 화면 방지
|
295
|
+
options.add_argument('--disable-sync') # Chrome 동기화 비활성화
|
296
|
+
options.add_argument('--disable-popup-blocking') # 팝업 방지 (로그인 창이 뜨는 경우 대비)
|
297
|
+
options.add_argument('--no-default-browser-check')
|
288
298
|
options.add_argument '--proxy-server='+proxy.to_s.force_encoding('utf-8').to_s
|
289
299
|
options.page_load_strategy = :normal
|
290
300
|
options.timeouts = {page_load: 20_000}
|
@@ -309,6 +319,9 @@ class Naver
|
|
309
319
|
options = Selenium::WebDriver::Chrome::Options.new
|
310
320
|
options.add_argument('--no-first-run') # 자동 실행 시 나타나는 "첫 실행" 화면 방지
|
311
321
|
options.add_argument('--disable-extensions') # 확장 프로그램 초기화 화면 방지
|
322
|
+
options.add_argument('--disable-sync') # Chrome 동기화 비활성화
|
323
|
+
options.add_argument('--disable-popup-blocking') # 팝업 방지 (로그인 창이 뜨는 경우 대비)
|
324
|
+
options.add_argument('--no-default-browser-check')
|
312
325
|
options.page_load_strategy = :normal
|
313
326
|
options.timeouts = {page_load: 20_000}
|
314
327
|
options.page_load_strategy = 'none'
|
@@ -334,6 +347,7 @@ class Naver
|
|
334
347
|
|
335
348
|
|
336
349
|
|
350
|
+
|
337
351
|
def login(user_id, user_pw, proxy)
|
338
352
|
@user_id = user_id
|
339
353
|
@user_id11 = user_id
|
@@ -372,13 +386,21 @@ class Naver
|
|
372
386
|
puts'[Step.02] 계정 세션 확인!! 로그인 skip.......'.yellow
|
373
387
|
sleep(2.5)
|
374
388
|
rescue
|
375
|
-
|
376
|
-
|
377
|
-
|
378
|
-
|
379
|
-
|
380
|
-
|
381
|
-
|
389
|
+
begin
|
390
|
+
wait = Selenium::WebDriver::Wait.new(:timeout => 7)
|
391
|
+
# 요소가 나타날 때까지 기다립니다.
|
392
|
+
wait.until { @driver.find_element(:xpath, '//*[@class="MyView-module__link_login___HpHMW"]') }
|
393
|
+
sleep(1.5)
|
394
|
+
|
395
|
+
# 요소가 있으면 클릭
|
396
|
+
@driver.find_element(:xpath, '//*[@class="MyView-module__link_login___HpHMW"]').click
|
397
|
+
check_cookie_login = 0
|
398
|
+
sleep(1)
|
399
|
+
rescue
|
400
|
+
|
401
|
+
return 0
|
402
|
+
@driver.quit
|
403
|
+
end
|
382
404
|
end
|
383
405
|
|
384
406
|
if check_cookie_login == 0
|
@@ -413,8 +435,9 @@ class Naver
|
|
413
435
|
puts "Failed to close tab: #{e.message}"
|
414
436
|
end
|
415
437
|
end
|
416
|
-
return 0
|
417
438
|
@driver.quit
|
439
|
+
return 0
|
440
|
+
|
418
441
|
end
|
419
442
|
|
420
443
|
else
|
@@ -437,8 +460,9 @@ class Naver
|
|
437
460
|
puts "Failed to close tab: #{e.message}"
|
438
461
|
end
|
439
462
|
end
|
440
|
-
return 0
|
441
463
|
@driver.quit
|
464
|
+
return 0
|
465
|
+
|
442
466
|
end
|
443
467
|
end
|
444
468
|
|
@@ -1077,8 +1101,9 @@ end
|
|
1077
1101
|
puts "Failed to close tab: #{e.message}"
|
1078
1102
|
end
|
1079
1103
|
end
|
1080
|
-
|
1081
|
-
|
1104
|
+
@driver.quit
|
1105
|
+
return 0
|
1106
|
+
|
1082
1107
|
end
|
1083
1108
|
|
1084
1109
|
|
@@ -1106,8 +1131,9 @@ end
|
|
1106
1131
|
puts "Failed to close tab: #{e.message}"
|
1107
1132
|
end
|
1108
1133
|
end
|
1109
|
-
return 0
|
1110
1134
|
@driver.quit
|
1135
|
+
return 0
|
1136
|
+
|
1111
1137
|
end
|
1112
1138
|
sleep(2)
|
1113
1139
|
@driver.action.key_down(:control).key_down('a').key_up('a').key_up(:control).perform
|
@@ -2061,6 +2087,7 @@ end
|
|
2061
2087
|
end
|
2062
2088
|
end
|
2063
2089
|
|
2090
|
+
|
2064
2091
|
class Wordpress
|
2065
2092
|
include Glimmer
|
2066
2093
|
def get_mac_address
|
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.59
|
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-17 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: File to Clipboard gem
|
14
14
|
email: mymin26@naver.com
|