duo_blog_comment 0.0.33 → 0.0.36
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/duo_blog_comment.rb +50 -13
- 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: 325338a364b7a41737e4aac73bbdabb503864c9142a4e45be7a552683d0959eb
|
4
|
+
data.tar.gz: 9fc2dcab3a30907c34c5536c6c57c88f284d93bfae68ae00e20b53147465d2ef
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a3537d7cc56a33d84f2987e9b79807dd9166dbff237266ed2a680e862d4fa9cd5e1e0eb69cd28ed4b77961a58ee9c667f5a37a6b90f3a0ce733b4f36234ad62d
|
7
|
+
data.tar.gz: d67049db7c09c101c50446c5667fd227a3f13059c1d3d9355758814ad3b0492b9fc8e8e24972604ac29561135679f3267a6f8e58ef55cb9b1abc7006bc6147db
|
data/lib/duo_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,19 +258,15 @@ class Naver
|
|
259
258
|
end
|
260
259
|
end
|
261
260
|
|
262
|
-
def create_id
|
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
|
268
261
|
|
269
|
-
|
262
|
+
|
263
|
+
def update(content,image,option,counts_number,keyword,blog_url,api_key,counts_delay)
|
270
264
|
|
271
265
|
@keyword = keyword
|
272
266
|
@content = content
|
273
267
|
@api_key = api_key
|
274
268
|
@blog_url = blog_url
|
269
|
+
#sleep(counts_delay)
|
275
270
|
|
276
271
|
|
277
272
|
|
@@ -1245,6 +1240,27 @@ class Naver
|
|
1245
1240
|
end
|
1246
1241
|
end
|
1247
1242
|
sleep(1)
|
1243
|
+
if option['비공개댓글'] == 'true'
|
1244
|
+
begin
|
1245
|
+
@driver.find_element(:xpath, '//*[@class="u_cbox_secret_label"]').click
|
1246
|
+
sleep(1)
|
1247
|
+
rescue
|
1248
|
+
begin
|
1249
|
+
@driver.find_element(:xpath, '//*[@class="u_cbox_secret_check"]').click
|
1250
|
+
sleep(1)
|
1251
|
+
rescue
|
1252
|
+
begin
|
1253
|
+
@driver.find_element(:xpath, '//*[@class="u_cbox_txt_secret"]').click
|
1254
|
+
sleep(1)
|
1255
|
+
rescue
|
1256
|
+
end
|
1257
|
+
end
|
1258
|
+
end
|
1259
|
+
else
|
1260
|
+
# 여기에 다른 코드 추가 가능
|
1261
|
+
end
|
1262
|
+
|
1263
|
+
|
1248
1264
|
begin
|
1249
1265
|
element = @driver.find_element(:xpath, '//*[@data-uiselector="writeButton"]')
|
1250
1266
|
@driver.execute_script("arguments[0].scrollIntoView({block: 'center', inline: 'center'})", element) # 크롤 이동
|
@@ -1275,6 +1291,11 @@ class Naver
|
|
1275
1291
|
end
|
1276
1292
|
posting_url = @driver.current_url
|
1277
1293
|
puts "#{posting_url} [댓글 작성 완료 !!]".cyan
|
1294
|
+
|
1295
|
+
begin
|
1296
|
+
sleep(counts_delay)
|
1297
|
+
rescue
|
1298
|
+
end
|
1278
1299
|
|
1279
1300
|
sleep(2)
|
1280
1301
|
begin
|
@@ -1786,7 +1807,7 @@ class Wordpress
|
|
1786
1807
|
|
1787
1808
|
|
1788
1809
|
|
1789
|
-
|
1810
|
+
if @data['포스트설정']['공유하기'].checked?
|
1790
1811
|
option['공유하기'] = 'true'
|
1791
1812
|
else
|
1792
1813
|
option['공유하기'] = 'false'
|
@@ -1797,7 +1818,7 @@ class Wordpress
|
|
1797
1818
|
else
|
1798
1819
|
option['공유하기비공개'] = 'false'
|
1799
1820
|
end
|
1800
|
-
@data['table'][index][-1] =
|
1821
|
+
@data['table'][index][-1] = 80
|
1801
1822
|
@data['table'] << []
|
1802
1823
|
@data['table'].pop
|
1803
1824
|
|
@@ -1808,10 +1829,18 @@ class Wordpress
|
|
1808
1829
|
else
|
1809
1830
|
option['댓글패스'] = 'false'
|
1810
1831
|
end
|
1811
|
-
@data['table'][index][-1] =
|
1832
|
+
@data['table'][index][-1] = 85
|
1812
1833
|
@data['table'] << []
|
1813
1834
|
@data['table'].pop
|
1814
1835
|
|
1836
|
+
if @data['포스트설정']['비공개댓글'].checked?
|
1837
|
+
option['비공개댓글'] = 'true'
|
1838
|
+
else
|
1839
|
+
option['비공개댓글'] = 'false'
|
1840
|
+
end
|
1841
|
+
@data['table'][index][-1] = 90
|
1842
|
+
@data['table'] << []
|
1843
|
+
@data['table'].pop
|
1815
1844
|
|
1816
1845
|
|
1817
1846
|
|
@@ -1848,8 +1877,9 @@ class Wordpress
|
|
1848
1877
|
|
1849
1878
|
# 댓글 설정 수 카운트
|
1850
1879
|
counts_number = @data['table'][index][6].to_i
|
1880
|
+
counts_delay = @data['table'][index][5].to_i
|
1851
1881
|
api_key = @data['포스트설정']['api_key'].text.to_s.force_encoding('utf-8')
|
1852
|
-
naver.update(content,image,option,counts_number,keyword,blog_url,api_key)
|
1882
|
+
naver.update(content,image,option,counts_number,keyword,blog_url,api_key,counts_delay)
|
1853
1883
|
|
1854
1884
|
|
1855
1885
|
|
@@ -3170,9 +3200,16 @@ class Wordpress
|
|
3170
3200
|
end
|
3171
3201
|
}
|
3172
3202
|
}
|
3203
|
+
@data['포스트설정']['비공개댓글'] = checkbox('🔒비공개 댓글 '){
|
3204
|
+
top 1
|
3205
|
+
left 3
|
3206
|
+
on_toggled{
|
3207
|
+
|
3208
|
+
}
|
3209
|
+
}
|
3173
3210
|
@data['포스트설정']['댓글패스'] = checkbox('🔙이미 작성한 댓글이 있는 경우 패스'){
|
3174
3211
|
top 1
|
3175
|
-
left
|
3212
|
+
left 4
|
3176
3213
|
on_toggled{
|
3177
3214
|
|
3178
3215
|
}
|
metadata
CHANGED
@@ -1,14 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: duo_blog_comment
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.36
|
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-05-16 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: []
|