njongto_duo 0.0.73 → 0.0.77
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/njongto_duo.rb +36 -34
- 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: 46911fe2ade93b5ee8fee31f6e478f2436dfa0d43f14622401a44e7de77d0ac0
|
4
|
+
data.tar.gz: 73ce7a2290640ab7f7fbc366363b4e9c0c881f96a689d0611362ae9c540ed2b3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2c41ea3d2524642b06dfaeb17b121b29815caaee7e43912122a6676785856e0b8168b0550d40f90daff4db74ed3867040d25de4a49ba4faee7ab44ffff0b44de
|
7
|
+
data.tar.gz: 497827bf3924570ca8e7b408aae16dfd0885c6e851f2bfa7bbe96ca9502033b052a24c1c31d27a26d9747412ea56e4c8ad9f0a66c86fcce0b3b42394ade3e382
|
data/lib/njongto_duo.rb
CHANGED
@@ -30,11 +30,11 @@ class Naver
|
|
30
30
|
FileUtils.mkdir_p(naver_cookie_dir) unless File.exist?(naver_cookie_dir)
|
31
31
|
if proxy == ''
|
32
32
|
|
33
|
-
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})
|
33
|
+
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})
|
34
34
|
|
35
35
|
else
|
36
36
|
|
37
|
-
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})
|
37
|
+
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})
|
38
38
|
|
39
39
|
end
|
40
40
|
end
|
@@ -186,61 +186,64 @@ class Naver
|
|
186
186
|
|
187
187
|
|
188
188
|
chrome_start(proxy, user_id)
|
189
|
-
|
190
|
-
puts'[Step.01] 계정 로그인 및 세션 확인.......'.yellow
|
191
|
-
|
189
|
+
|
192
190
|
|
193
191
|
sleep(1)
|
194
192
|
|
195
193
|
begin
|
196
|
-
wait = Selenium::WebDriver::Wait.new(:timeout =>
|
194
|
+
wait = Selenium::WebDriver::Wait.new(:timeout => 5)
|
197
195
|
#요소가 나타날 때까지 3초 동안 기다립니다.
|
198
|
-
wait.until { @driver.find_element(:xpath, '//*[@class="
|
196
|
+
wait.until { @driver.find_element(:xpath, '//*[@class="HeaderView_email__beGsy"]') }
|
199
197
|
sleep(1.5)
|
200
198
|
check_cookie_login = 1
|
201
|
-
puts'
|
199
|
+
puts'✅ 계정 세션 확인!! 로그인 skip.......'.yellow
|
202
200
|
sleep(2.5)
|
203
201
|
rescue
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
202
|
+
begin
|
203
|
+
wait = Selenium::WebDriver::Wait.new(:timeout => 3)
|
204
|
+
wait.until { @driver.find_element(:xpath, '//*[@class="HeaderView_login_text__pFpJ_"]') }
|
205
|
+
sleep(1.5)
|
206
|
+
@driver.find_element(:xpath, '//*[@class="HeaderView_login_text__pFpJ_"]').click
|
207
|
+
check_cookie_login = 0
|
208
|
+
sleep(1)
|
209
|
+
rescue
|
210
|
+
@driver.quit
|
211
|
+
return 0
|
212
|
+
end
|
211
213
|
end
|
212
214
|
|
213
215
|
if check_cookie_login == 0
|
214
|
-
puts'
|
216
|
+
puts'✅ 계정 세션이 없거나 기간 만료로 인해 로그인 시도.......'.yellow
|
215
217
|
# @driver.find_element(:xpath, '//*[@id="right-content-area"]/div[1]/div[1]/div/a').click
|
216
218
|
sleep(3)
|
217
219
|
begin
|
218
220
|
wait = Selenium::WebDriver::Wait.new(:timeout => 7)
|
219
221
|
#요소가 나타날 때까지 3초 동안 기다립니다.
|
220
|
-
wait.until { @driver.find_element(:xpath, '//*[@id="id"
|
221
|
-
|
222
|
+
wait.until { @driver.find_element(:xpath, '//*[@id="id"]') }
|
223
|
+
sleep(1.5)
|
224
|
+
|
225
|
+
@driver.find_element(:xpath, '//*[@id="id"]').click
|
222
226
|
Clipboard.copy(user_id)
|
223
227
|
@driver.action.key_down(:control).send_keys('v').key_up(:control).perform
|
224
228
|
sleep(1.5)
|
225
|
-
@driver.find_element(:xpath, '//*[@id="pw"
|
229
|
+
@driver.find_element(:xpath, '//*[@id="pw"]').click
|
226
230
|
Clipboard.copy(user_pw)
|
227
231
|
@driver.action.key_down(:control).send_keys('v').key_up(:control).perform
|
228
232
|
sleep(1.5)
|
229
|
-
|
233
|
+
@driver.find_element(:xpath, '//*[@type="submit" and @class="btn_check next_step" and @id="submit_btn"]').click
|
234
|
+
sleep(2.5)
|
230
235
|
begin
|
231
|
-
|
232
|
-
|
233
|
-
@driver.find_element(xpath
|
236
|
+
wait = Selenium::WebDriver::Wait.new(:timeout => 3)
|
237
|
+
#요소가 나타날 때까지 3초 동안 기다립니다.
|
238
|
+
wait.until { @driver.find_element(:xpath, '//button[@ype="button" and @id="new.save" and @class="btn_check nlog-click"]') } #기기 확인 버튼 확인
|
239
|
+
#wait.until { @driver.find_element(:xpath, '//button[@ype="button" and @id="new.dontsave" and @class="btn_white nlog-click"]') } #기기 취소 버튼 확인
|
234
240
|
sleep(1.5)
|
235
|
-
|
236
|
-
|
237
|
-
|
241
|
+
@driver.find_element(:xpath, '//button[@ype="button" and @id="new.save" and @class="btn_check nlog-click"]').click
|
242
|
+
#@driver.find_element(:xpath, '//button[@ype="button" and @id="new.dontsave" and @class="btn_white nlog-click"]') #기기 취소 버튼 클릭
|
243
|
+
rescue
|
244
|
+
end
|
245
|
+
|
238
246
|
|
239
|
-
wait = Selenium::WebDriver::Wait.new(:timeout => 3)
|
240
|
-
#요소가 나타날 때까지 3초 동안 기다립니다.
|
241
|
-
wait.until { @driver.find_element(xpath: '//button[@type="submit" and @id="log.login"]') }
|
242
|
-
@driver.find_element(xpath: '//button[@type="submit" and @id="log.login"]').click
|
243
|
-
sleep(2.5)
|
244
247
|
rescue => e
|
245
248
|
puts '-[√] 로딩 지연 접속 실패.......'.red
|
246
249
|
@driver.window_handles.each do |handle|
|
@@ -254,7 +257,7 @@ class Naver
|
|
254
257
|
end
|
255
258
|
return 0
|
256
259
|
@driver.quit
|
257
|
-
end
|
260
|
+
end
|
258
261
|
|
259
262
|
else
|
260
263
|
# @driver.switch_to.default_content
|
@@ -263,8 +266,7 @@ class Naver
|
|
263
266
|
begin
|
264
267
|
wait = Selenium::WebDriver::Wait.new(:timeout => 5)
|
265
268
|
#요소가 나타날 때까지 3초 동안 기다립니다.
|
266
|
-
wait.until { @driver.find_element(:xpath, '//*[@
|
267
|
-
|
269
|
+
wait.until { @driver.find_element(:xpath, '//*[@class="HeaderView_email__beGsy"]') }
|
268
270
|
rescue => e
|
269
271
|
puts '-[√] 로그인 실패.......'.red
|
270
272
|
@driver.window_handles.each do |handle|
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: njongto_duo
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.77
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- zon
|
8
8
|
bindir: bin
|
9
9
|
cert_chain: []
|
10
|
-
date: 2025-07-
|
10
|
+
date: 2025-07-16 00:00:00.000000000 Z
|
11
11
|
dependencies: []
|
12
12
|
description: File to Clipboard gem
|
13
13
|
email: mymin26@naver.com
|