njongto_duo 0.0.73 → 0.0.75
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 +25 -35
- 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: a84f13e40b76162f469ed53cdb8d80e409706ac767835c7d84bec16e86c9835e
|
4
|
+
data.tar.gz: 1b70cbe0887d104d519685004b54b677eec44a7eac845030eb2405b0e6e41693
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3bbce65d189dc66800e6df1d4768f6cb03d558d28989fd7cfea03d83bb2d1e015bb91c278b56643b3b6c03223ef04aed021d1b20bde5a65b3dc67e6d69ccec40
|
7
|
+
data.tar.gz: 6325d731738420b90fe8dd61629cdfa4598a4130902c64f53cf3879fb3fbb3e229447e918a8b2ec1895f8f43a0dbe9fb8dc46d241a37e7ea7a13b6e35fe8141f
|
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,60 +186,51 @@ 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
|
-
|
230
|
-
begin
|
231
|
-
smart_level_value = @driver.find_element(id: 'smart_LEVEL').attribute('value')
|
232
|
-
if smart_level_value == '1'
|
233
|
-
@driver.find_element(xpath: '//label[@for="switch" and @class="switch_btn"]').click
|
234
|
-
sleep(1.5)
|
235
|
-
end
|
236
|
-
rescue
|
237
|
-
end
|
238
|
-
|
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
|
233
|
+
@driver.find_element(:xpath, '//*[@type="submit" and @class="btn_check next_step" and @id="submit_btn"]').click
|
243
234
|
sleep(2.5)
|
244
235
|
rescue => e
|
245
236
|
puts '-[√] 로딩 지연 접속 실패.......'.red
|
@@ -263,8 +254,7 @@ class Naver
|
|
263
254
|
begin
|
264
255
|
wait = Selenium::WebDriver::Wait.new(:timeout => 5)
|
265
256
|
#요소가 나타날 때까지 3초 동안 기다립니다.
|
266
|
-
wait.until { @driver.find_element(:xpath, '//*[@
|
267
|
-
|
257
|
+
wait.until { @driver.find_element(:xpath, '//*[@class="HeaderView_email__beGsy"]') }
|
268
258
|
rescue => e
|
269
259
|
puts '-[√] 로그인 실패.......'.red
|
270
260
|
@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.75
|
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-09 00:00:00.000000000 Z
|
11
11
|
dependencies: []
|
12
12
|
description: File to Clipboard gem
|
13
13
|
email: mymin26@naver.com
|