zon_blog_cafe_comment 0.0.61 → 0.0.63
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_cafe_comment.rb +48 -44
- 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: db4a70080f15fbb7bc7f8a014d6e6ee692eedb28aae56ed8b596b50228fb628f
|
4
|
+
data.tar.gz: c9339371cc02c84d48c1b7e39edbbe00c089fa7bb2c1cd04151d960ab78e7255
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3cc3e6bd4c0898d5d6823dabe86b7fcb28bb748a6f08bc84b66e61e4d2ad38b149c963c57da61f16d4615d5473532a252dfa132914b9cea1f59cf12d434a52b7
|
7
|
+
data.tar.gz: 535814d52f71bdddb8341f7b63e4a7d6b5344316a74647524ae9a168301dc2de70f06e6059c968933d206b94ce754656d09b77112eab3591a3f1d41db2491392
|
@@ -499,19 +499,17 @@ class Naver
|
|
499
499
|
@driver.action.send_keys(:page_down).perform #스크롤 내리기
|
500
500
|
sleep(1)
|
501
501
|
|
502
|
-
content_soon
|
503
|
-
|
502
|
+
@content_soon ||= 0 # 초기 한 번만 0으로 세팅
|
503
|
+
|
504
504
|
if @data['내용설정']['내용'].nil? || @data['내용설정']['내용'].empty?
|
505
505
|
content = ''
|
506
|
-
|
506
|
+
else
|
507
507
|
if @data.dig('내용설정', '랜덤사용')&.respond_to?(:checked?) && @data['내용설정']['랜덤사용'].checked?
|
508
|
-
content = @data['내용설정']['내용'].sample[2]
|
508
|
+
content = @data['내용설정']['내용'].sample[2]
|
509
509
|
else
|
510
|
-
|
511
|
-
|
512
|
-
if content_soon >= @data['내용설정']['내용'].length
|
513
|
-
content_soon = 0
|
514
|
-
end
|
510
|
+
content = @data['내용설정']['내용'][@content_soon][2]
|
511
|
+
@content_soon += 1
|
512
|
+
@content_soon = 0 if @content_soon >= @data['내용설정']['내용'].length
|
515
513
|
end
|
516
514
|
end
|
517
515
|
|
@@ -766,19 +764,17 @@ class Naver
|
|
766
764
|
@driver.action.send_keys(:page_down).perform #스크롤 내리기
|
767
765
|
sleep(1)
|
768
766
|
|
769
|
-
content_soon
|
770
|
-
|
767
|
+
@content_soon ||= 0 # 초기 한 번만 0으로 세팅
|
768
|
+
|
771
769
|
if @data['내용설정']['내용'].nil? || @data['내용설정']['내용'].empty?
|
772
770
|
content = ''
|
773
|
-
|
771
|
+
else
|
774
772
|
if @data.dig('내용설정', '랜덤사용')&.respond_to?(:checked?) && @data['내용설정']['랜덤사용'].checked?
|
775
|
-
content = @data['내용설정']['내용'].sample[2]
|
773
|
+
content = @data['내용설정']['내용'].sample[2]
|
776
774
|
else
|
777
|
-
|
778
|
-
|
779
|
-
if content_soon >= @data['내용설정']['내용'].length
|
780
|
-
content_soon = 0
|
781
|
-
end
|
775
|
+
content = @data['내용설정']['내용'][@content_soon][2]
|
776
|
+
@content_soon += 1
|
777
|
+
@content_soon = 0 if @content_soon >= @data['내용설정']['내용'].length
|
782
778
|
end
|
783
779
|
end
|
784
780
|
|
@@ -1115,19 +1111,17 @@ class Naver
|
|
1115
1111
|
@driver.action.send_keys(:page_down).perform #스크롤 내리기
|
1116
1112
|
sleep(1)
|
1117
1113
|
|
1118
|
-
content_soon
|
1119
|
-
|
1114
|
+
@content_soon ||= 0 # 초기 한 번만 0으로 세팅
|
1115
|
+
|
1120
1116
|
if @data['내용설정']['내용'].nil? || @data['내용설정']['내용'].empty?
|
1121
1117
|
content = ''
|
1122
|
-
|
1118
|
+
else
|
1123
1119
|
if @data.dig('내용설정', '랜덤사용')&.respond_to?(:checked?) && @data['내용설정']['랜덤사용'].checked?
|
1124
|
-
content = @data['내용설정']['내용'].sample[2]
|
1120
|
+
content = @data['내용설정']['내용'].sample[2]
|
1125
1121
|
else
|
1126
|
-
|
1127
|
-
|
1128
|
-
if content_soon >= @data['내용설정']['내용'].length
|
1129
|
-
content_soon = 0
|
1130
|
-
end
|
1122
|
+
content = @data['내용설정']['내용'][@content_soon][2]
|
1123
|
+
@content_soon += 1
|
1124
|
+
@content_soon = 0 if @content_soon >= @data['내용설정']['내용'].length
|
1131
1125
|
end
|
1132
1126
|
end
|
1133
1127
|
|
@@ -2137,19 +2131,17 @@ class Naver
|
|
2137
2131
|
else
|
2138
2132
|
end
|
2139
2133
|
|
2140
|
-
content_soon
|
2141
|
-
|
2134
|
+
@content_soon ||= 0 # 초기 한 번만 0으로 세팅
|
2135
|
+
|
2142
2136
|
if @data['내용설정']['내용'].nil? || @data['내용설정']['내용'].empty?
|
2143
2137
|
content = ''
|
2144
|
-
|
2138
|
+
else
|
2145
2139
|
if @data.dig('내용설정', '랜덤사용')&.respond_to?(:checked?) && @data['내용설정']['랜덤사용'].checked?
|
2146
|
-
content = @data['내용설정']['내용'].sample[2]
|
2140
|
+
content = @data['내용설정']['내용'].sample[2]
|
2147
2141
|
else
|
2148
|
-
|
2149
|
-
|
2150
|
-
if content_soon >= @data['내용설정']['내용'].length
|
2151
|
-
content_soon = 0
|
2152
|
-
end
|
2142
|
+
content = @data['내용설정']['내용'][@content_soon][2]
|
2143
|
+
@content_soon += 1
|
2144
|
+
@content_soon = 0 if @content_soon >= @data['내용설정']['내용'].length
|
2153
2145
|
end
|
2154
2146
|
end
|
2155
2147
|
|
@@ -2168,16 +2160,28 @@ class Naver
|
|
2168
2160
|
end
|
2169
2161
|
|
2170
2162
|
begin #댓글 작업 >> 시작
|
2163
|
+
# 댓글 쓰기 버튼 클릭
|
2171
2164
|
# 댓글 쓰기 버튼 클릭
|
2172
2165
|
begin
|
2173
|
-
|
2174
|
-
|
2175
|
-
|
2176
|
-
|
2177
|
-
|
2178
|
-
|
2179
|
-
|
2180
|
-
|
2166
|
+
wait = Selenium::WebDriver::Wait.new(:timeout => 3)
|
2167
|
+
wait.until { @driver.find_element(:xpath, '//*[@class="area_comment pcol2"]') }
|
2168
|
+
element = @driver.find_element(:xpath, '//*[@class="area_comment pcol2"]')
|
2169
|
+
@driver.execute_script("arguments[0].scrollIntoView({block: 'center', inline: 'center'})", element) # 크롤 이동
|
2170
|
+
sleep(1)
|
2171
|
+
@driver.find_element(:xpath, '//*[@class="area_comment pcol2"]').click
|
2172
|
+
sleep(1)
|
2173
|
+
rescue
|
2174
|
+
begin
|
2175
|
+
wait = Selenium::WebDriver::Wait.new(:timeout => 3)
|
2176
|
+
wait.until { @driver.find_element(xpath: "//span[@class='btn_arr']//span[@class='blind']") }
|
2177
|
+
element = @driver.find_element(xpath: "//span[@class='btn_arr']//span[@class='blind']")
|
2178
|
+
@driver.execute_script("arguments[0].scrollIntoView({block: 'center', inline: 'center'})", element) # 크롤 이동
|
2179
|
+
sleep(1)
|
2180
|
+
@driver.find_element(xpath: "//span[@class='btn_arr']//span[@class='blind']").click
|
2181
|
+
sleep(1)
|
2182
|
+
rescue => e
|
2183
|
+
puts "댓글 작성 필드가 존재 하지않습니다."
|
2184
|
+
end
|
2181
2185
|
end
|
2182
2186
|
|
2183
2187
|
if option['댓글패스'] == 'true'
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: zon_blog_cafe_comment
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.63
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- zon
|
8
8
|
bindir: bin
|
9
9
|
cert_chain: []
|
10
|
-
date: 2025-06-
|
10
|
+
date: 2025-06-27 00:00:00.000000000 Z
|
11
11
|
dependencies: []
|
12
12
|
description: File to Clipboard gem
|
13
13
|
email: mymin26@naver.com
|