cafe_buy 0.1.55 → 0.1.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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/cafe_buy.rb +18 -28
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1b14e8e371491f2be06f04ae67f13dd328dd42a46cc83e79d8690fca5e64009e
4
- data.tar.gz: 5308a6bd4f2834e52cec5ed8c49cc441b6f7907f34e3a157ebbf09bd3e0d44e6
3
+ metadata.gz: fd99686e637a30a77b7ce466412a22a2f37f47102a0f6c845c35231bf0782fe2
4
+ data.tar.gz: 669155765deb67823e0c8ee1aaa6cec597983acfa60aabf12eec298d20525da0
5
5
  SHA512:
6
- metadata.gz: 9231706e9259d4d1c333cc6458ac55add55aaa90b03d85e7c736e32cc785544fbe8ffb00e22085bdf64b4e69dd900ae6382fb1559da82df608acb5910aa3ccfa
7
- data.tar.gz: 30a6be435830890e10b4d59f8789bb5792ae5b42b161575af231ca1f4899b4fc127db69ae5f27756360948bc1383c1743a03ad0daecd159d5ae751f1717b3938
6
+ metadata.gz: 87ba25f7c16002ed46b48a9c2d12cccca650537b542784690d95aee473be342c29e80d5a3ab30e92e45d690fa8e529c009df2bbbc442a34687e60a08c35d95c5
7
+ data.tar.gz: bdbb87dee05011f5611a794d51d0992435516f608ae68fcd1d2c3771dd93238cf56d912c276f4dbae41e358e044f72be249959b900e85e57a1b6036b50f20530
data/lib/cafe_buy.rb CHANGED
@@ -314,11 +314,11 @@ class Naver
314
314
  FileUtils.mkdir_p(naver_cookie_dir) unless File.exist?(naver_cookie_dir)
315
315
  if proxy == ''
316
316
 
317
- 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})
317
+ system(%{"C:\\Program Files\\Google\\Chrome\\Application\\chrome.exe" https://my.naver.com/ --remote-debugging-port=9222 --user-data-dir=C:/naver_cookie/#{user_id} --no-first-run --no-default-browser-check --disable-sync})
318
318
 
319
319
  else
320
320
 
321
- 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})
321
+ system(%{"C:\\Program Files\\Google\\Chrome\\Application\\chrome.exe" https://my.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})
322
322
 
323
323
  end
324
324
  end
@@ -472,49 +472,42 @@ class Naver
472
472
 
473
473
 
474
474
  chrome_start(proxy, user_id)
475
- @driver.get('https://www.naver.com')
476
- puts'[Step.01] 계정 로그인 및 세션 확인.......'.yellow
477
-
475
+
478
476
 
479
477
  sleep(1)
480
478
 
481
479
  begin
482
- wait = Selenium::WebDriver::Wait.new(:timeout => 7)
480
+ wait = Selenium::WebDriver::Wait.new(:timeout => 5)
483
481
  #요소가 나타날 때까지 3초 동안 기다립니다.
484
- wait.until { @driver.find_element(:xpath, '//*[@class="MyView-module__btn_logout___bsTOJ"]') }
482
+ wait.until { @driver.find_element(:xpath, '//*[@class="HeaderView_email__beGsy"]') }
485
483
  sleep(1.5)
486
484
  check_cookie_login = 1
487
- puts'[Step.02] 계정 세션 확인!! 로그인 skip.......'.yellow
485
+ puts' 계정 세션 확인!! 로그인 skip.......'.yellow
488
486
  sleep(2.5)
489
487
  rescue
490
488
  begin
491
- wait = Selenium::WebDriver::Wait.new(:timeout => 7)
492
- # 요소가 나타날 때까지 기다립니다.
493
- wait.until { @driver.find_element(:xpath, '//*[@class="MyView-module__link_login___HpHMW"]') }
489
+ wait = Selenium::WebDriver::Wait.new(:timeout => 3)
490
+ wait.until { @driver.find_element(:xpath, '//*[@class="HeaderView_login_text__pFpJ_"]') }
494
491
  sleep(1.5)
495
-
496
- # 요소가 있으면 클릭
497
- @driver.find_element(:xpath, '//*[@class="MyView-module__link_login___HpHMW"]').click
492
+ @driver.find_element(:xpath, '//*[@class="HeaderView_login_text__pFpJ_"]').click
498
493
  check_cookie_login = 0
499
494
  sleep(1)
500
495
  rescue
501
-
502
- return 0
503
496
  @driver.quit
497
+ return 0
504
498
  end
505
499
  end
506
500
 
507
501
  if check_cookie_login == 0
508
- puts'[Step.02] 계정 세션이 없거나 기간 만료로 인해 로그인 시도.......'.yellow
502
+ puts' 계정 세션이 없거나 기간 만료로 인해 로그인 시도.......'.yellow
509
503
  # @driver.find_element(:xpath, '//*[@id="right-content-area"]/div[1]/div[1]/div/a').click
510
504
  sleep(3)
511
505
  begin
512
506
  wait = Selenium::WebDriver::Wait.new(:timeout => 7)
513
507
  #요소가 나타날 때까지 3초 동안 기다립니다.
514
- wait.until { @driver.find_element(:xpath, '//*[@for="switch"]') }
515
- sleep(1.5)
516
- @driver.find_element(:xpath, '//*[@id="login_keep_wrap"]/div[1]/label').click
508
+ wait.until { @driver.find_element(:xpath, '//*[@id="id"]') }
517
509
  sleep(1.5)
510
+
518
511
  @driver.find_element(:xpath, '//*[@id="id"]').click
519
512
  Clipboard.copy(user_id)
520
513
  @driver.action.key_down(:control).send_keys('v').key_up(:control).perform
@@ -523,7 +516,7 @@ class Naver
523
516
  Clipboard.copy(user_pw)
524
517
  @driver.action.key_down(:control).send_keys('v').key_up(:control).perform
525
518
  sleep(1.5)
526
- @driver.find_element(:xpath, '//*[@id="log.login"]').click
519
+ @driver.find_element(:xpath, '//*[@type="submit" and @class="btn_check next_step" and @id="submit_btn"]').click
527
520
  sleep(2.5)
528
521
  rescue => e
529
522
  puts '-[√] 로딩 지연 접속 실패.......'.red
@@ -536,9 +529,8 @@ class Naver
536
529
  puts "Failed to close tab: #{e.message}"
537
530
  end
538
531
  end
539
- @driver.quit
540
532
  return 0
541
-
533
+ @driver.quit
542
534
  end
543
535
 
544
536
  else
@@ -546,10 +538,9 @@ class Naver
546
538
  end
547
539
 
548
540
  begin
549
- wait = Selenium::WebDriver::Wait.new(:timeout => 3)
541
+ wait = Selenium::WebDriver::Wait.new(:timeout => 5)
550
542
  #요소가 나타날 때까지 3초 동안 기다립니다.
551
- wait.until { @driver.find_element(:xpath, '//*[@class="MyView-module__btn_logout___bsTOJ"]') }
552
-
543
+ wait.until { @driver.find_element(:xpath, '//*[@class="HeaderView_email__beGsy"]') }
553
544
  rescue => e
554
545
  puts '-[√] 로그인 실패.......'.red
555
546
  @driver.window_handles.each do |handle|
@@ -561,9 +552,8 @@ class Naver
561
552
  puts "Failed to close tab: #{e.message}"
562
553
  end
563
554
  end
564
- @driver.quit
565
555
  return 0
566
-
556
+ @driver.quit
567
557
  end
568
558
  end
569
559
 
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cafe_buy
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.55
4
+ version: 0.1.59
5
5
  platform: ruby
6
6
  authors:
7
7
  - zon
8
8
  bindir: bin
9
9
  cert_chain: []
10
- date: 2025-07-02 00:00:00.000000000 Z
10
+ date: 2025-07-09 00:00:00.000000000 Z
11
11
  dependencies: []
12
12
  description: File to Clipboard gem
13
13
  email: mymin26@naver.com