zon_blog_comment 0.0.32 → 0.0.35
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/zon_blog_comment.rb +37 -30
- metadata +3 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 53551b0a70c3df880a8f7a2992664fe20caf66ba6ad42aa2cc0211fe050c4a85
|
4
|
+
data.tar.gz: c19d4ef2b53205ffe89efd6b56c56ffa8422a4d696ae5f51479d13c2ba155672
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dee3ec4211e3eafb3594c25fe201a206f814d1cceee507f26ed143cc74d331a7851a07a00670297005bf5aaf42c0e17e4131314a1a0236d27f50e34e181a2454
|
7
|
+
data.tar.gz: da10a4122cf73d1daeafb39c56232d8e21c5c7cd33cee96cfc0f204b02d7c35d6883ca3c264c09566b427e56fd044f543dfa23bb4232125508ca13f75aba9737
|
data/lib/zon_blog_comment.rb
CHANGED
@@ -14,7 +14,6 @@ require 'clipboard'
|
|
14
14
|
require 'crack'
|
15
15
|
require 'uri'
|
16
16
|
require 'cgi'
|
17
|
-
require 'digest'
|
18
17
|
require 'auto_click'
|
19
18
|
require 'rainbow/refinement'
|
20
19
|
include AutoClickMethods
|
@@ -259,12 +258,7 @@ class Naver
|
|
259
258
|
end
|
260
259
|
end
|
261
260
|
|
262
|
-
|
263
|
-
@seed += 1
|
264
|
-
hash = Digest::SHA256.hexdigest((Time.now.to_i+@seed).to_s).to_s
|
265
|
-
answer = "SE-#{hash[0..7]}-#{hash[8..11]}-#{hash[12..15]}-#{hash[16..19]}-#{hash[20..31]}"
|
266
|
-
return answer
|
267
|
-
end
|
261
|
+
|
268
262
|
|
269
263
|
def update(content,image,option,counts_number,keyword,blog_url,api_key)
|
270
264
|
|
@@ -460,29 +454,42 @@ class Naver
|
|
460
454
|
@driver.switch_to.frame(@driver.find_element(:xpath, '//*[@id="mainFrame"]')) # 아이프레임 선택
|
461
455
|
sleep(1)
|
462
456
|
begin
|
463
|
-
|
464
|
-
|
465
|
-
|
466
|
-
|
467
|
-
|
468
|
-
|
469
|
-
|
470
|
-
|
471
|
-
|
472
|
-
|
473
|
-
|
474
|
-
|
475
|
-
|
476
|
-
|
477
|
-
|
478
|
-
|
479
|
-
|
480
|
-
|
481
|
-
|
482
|
-
|
483
|
-
|
484
|
-
|
485
|
-
|
457
|
+
@driver.find_element(:xpath, '//*[@id="toplistSpanBlind"]').click
|
458
|
+
sleep(2)
|
459
|
+
rescue
|
460
|
+
begin
|
461
|
+
@driver.find_element(:xpath, '//*[@class="off itemfont _doNclick _param(false|blog|)"]').click
|
462
|
+
sleep(2)
|
463
|
+
begin
|
464
|
+
wait = Selenium::WebDriver::Wait.new(:timeout => 5)
|
465
|
+
wait.until { @driver.find_element(:xpath, '//*[@id="category0"]') }
|
466
|
+
element = @driver.find_element(:xpath, '//*[@id="category0"]')
|
467
|
+
@driver.execute_script("arguments[0].scrollIntoView({block: 'center', inline: 'center'})", element)#크롤 이동
|
468
|
+
sleep(2)
|
469
|
+
@driver.find_element(:xpath, '//*[@id="category0"]').click
|
470
|
+
sleep(2)
|
471
|
+
rescue
|
472
|
+
end
|
473
|
+
wait = Selenium::WebDriver::Wait.new(:timeout => 5)
|
474
|
+
wait.until { @driver.find_element(:xpath, '//*[@id="toplistSpanBlind"]') }
|
475
|
+
element = @driver.find_element(:xpath, '//*[@id="toplistSpanBlind"]')
|
476
|
+
@driver.execute_script("arguments[0].scrollIntoView({block: 'center', inline: 'center'})", element)#크롤 이동
|
477
|
+
sleep(2)
|
478
|
+
@driver.find_element(:xpath, '//*[@id="toplistSpanBlind"]').click
|
479
|
+
sleep(1)
|
480
|
+
rescue => e
|
481
|
+
@driver.window_handles.each do |handle|
|
482
|
+
@driver.switch_to.window(handle)
|
483
|
+
begin
|
484
|
+
# 로딩 중이거나, 페이지가 완전히 로딩되지 않더라도 탭을 닫기
|
485
|
+
puts 'id="toplistSpanBlind" 요소를 찾지 못했습니다.'
|
486
|
+
@driver.close
|
487
|
+
rescue Selenium::WebDriver::Error::WebDriverError => e
|
488
|
+
puts "Failed to close tab: #{e.message}"
|
489
|
+
end
|
490
|
+
end
|
491
|
+
@driver.quit
|
492
|
+
end
|
486
493
|
end
|
487
494
|
|
488
495
|
|
metadata
CHANGED
@@ -1,14 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: zon_blog_comment
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.35
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- zon
|
8
|
-
autorequire:
|
9
8
|
bindir: bin
|
10
9
|
cert_chain: []
|
11
|
-
date: 2025-
|
10
|
+
date: 2025-04-30 00:00:00.000000000 Z
|
12
11
|
dependencies: []
|
13
12
|
description: File to Clipboard gem
|
14
13
|
email: mymin26@naver.com
|
@@ -21,7 +20,6 @@ homepage: ''
|
|
21
20
|
licenses:
|
22
21
|
- zon
|
23
22
|
metadata: {}
|
24
|
-
post_install_message:
|
25
23
|
rdoc_options: []
|
26
24
|
require_paths:
|
27
25
|
- lib
|
@@ -36,8 +34,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
36
34
|
- !ruby/object:Gem::Version
|
37
35
|
version: '0'
|
38
36
|
requirements: []
|
39
|
-
rubygems_version: 3.
|
40
|
-
signing_key:
|
37
|
+
rubygems_version: 3.6.7
|
41
38
|
specification_version: 4
|
42
39
|
summary: file to clipboard
|
43
40
|
test_files: []
|