zon_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/zon_blog_comment.rb +49 -11
- 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: 5e26bf14f6e57c78db2a4cd03ddf238a9bd6fef36a8436db1de47ee5c33c88ce
|
4
|
+
data.tar.gz: 9e3e541a2896078ede219fd6d4ead40fe48e03e4443edff14f4cb09a09e33072
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3d88af4a67e75ea6acfab4a442b0765500033b12dbec41c92a535084261fc591ac8358f651279901c46f95c1636478f198cae3d3faea88280d28fef5a1fdbf9f
|
7
|
+
data.tar.gz: 6f2e89a0160ac21fed6194d868b5da9f1ff1faa561b4e6fa140a23da7c78918f3b973ee0d49f3338a693815ab0924d097d0002ce3f9425c9f59508349dc743ac
|
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,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
|
|
@@ -1244,6 +1239,27 @@ class Naver
|
|
1244
1239
|
end
|
1245
1240
|
end
|
1246
1241
|
sleep(1)
|
1242
|
+
if option['비공개댓글'] == 'true'
|
1243
|
+
begin
|
1244
|
+
@driver.find_element(:xpath, '//*[@class="u_cbox_secret_label"]').click
|
1245
|
+
sleep(1)
|
1246
|
+
rescue
|
1247
|
+
begin
|
1248
|
+
@driver.find_element(:xpath, '//*[@class="u_cbox_secret_check"]').click
|
1249
|
+
sleep(1)
|
1250
|
+
rescue
|
1251
|
+
begin
|
1252
|
+
@driver.find_element(:xpath, '//*[@class="u_cbox_txt_secret"]').click
|
1253
|
+
sleep(1)
|
1254
|
+
rescue
|
1255
|
+
end
|
1256
|
+
end
|
1257
|
+
end
|
1258
|
+
else
|
1259
|
+
# 여기에 다른 코드 추가 가능
|
1260
|
+
end
|
1261
|
+
|
1262
|
+
|
1247
1263
|
begin
|
1248
1264
|
element = @driver.find_element(:xpath, '//*[@data-uiselector="writeButton"]')
|
1249
1265
|
@driver.execute_script("arguments[0].scrollIntoView({block: 'center', inline: 'center'})", element) # 크롤 이동
|
@@ -1274,6 +1290,11 @@ class Naver
|
|
1274
1290
|
end
|
1275
1291
|
posting_url = @driver.current_url
|
1276
1292
|
puts "#{posting_url} [댓글 작성 완료 !!]".cyan
|
1293
|
+
|
1294
|
+
begin
|
1295
|
+
sleep(counts_delay)
|
1296
|
+
rescue
|
1297
|
+
end
|
1277
1298
|
|
1278
1299
|
sleep(2)
|
1279
1300
|
begin
|
@@ -1726,7 +1747,7 @@ end
|
|
1726
1747
|
else
|
1727
1748
|
option['공유하기비공개'] = 'false'
|
1728
1749
|
end
|
1729
|
-
@data['table'][index][-1] =
|
1750
|
+
@data['table'][index][-1] = 80
|
1730
1751
|
@data['table'] << []
|
1731
1752
|
@data['table'].pop
|
1732
1753
|
|
@@ -1737,6 +1758,15 @@ end
|
|
1737
1758
|
else
|
1738
1759
|
option['댓글패스'] = 'false'
|
1739
1760
|
end
|
1761
|
+
@data['table'][index][-1] = 85
|
1762
|
+
@data['table'] << []
|
1763
|
+
@data['table'].pop
|
1764
|
+
|
1765
|
+
if @data['포스트설정']['비공개댓글'].checked?
|
1766
|
+
option['비공개댓글'] = 'true'
|
1767
|
+
else
|
1768
|
+
option['비공개댓글'] = 'false'
|
1769
|
+
end
|
1740
1770
|
@data['table'][index][-1] = 90
|
1741
1771
|
@data['table'] << []
|
1742
1772
|
@data['table'].pop
|
@@ -1777,8 +1807,9 @@ end
|
|
1777
1807
|
|
1778
1808
|
# 댓글 설정 수 카운트
|
1779
1809
|
counts_number = @data['table'][index][6].to_i
|
1810
|
+
counts_delay = @data['table'][index][5].to_i
|
1780
1811
|
api_key = @data['포스트설정']['api_key'].text.to_s.force_encoding('utf-8')
|
1781
|
-
naver.update(content,image,option,counts_number,keyword,blog_url,api_key)
|
1812
|
+
naver.update(content,image,option,counts_number,keyword,blog_url,api_key,counts_delay)
|
1782
1813
|
|
1783
1814
|
|
1784
1815
|
|
@@ -3094,13 +3125,20 @@ end
|
|
3094
3125
|
end
|
3095
3126
|
}
|
3096
3127
|
}
|
3097
|
-
@data['포스트설정']['
|
3128
|
+
@data['포스트설정']['비공개댓글'] = checkbox('🔒비공개 댓글 '){
|
3098
3129
|
top 1
|
3099
3130
|
left 3
|
3100
3131
|
on_toggled{
|
3101
3132
|
|
3102
3133
|
}
|
3103
3134
|
}
|
3135
|
+
@data['포스트설정']['댓글패스'] = checkbox('🔙이미 작성한 댓글이 있는 경우 패스'){
|
3136
|
+
top 1
|
3137
|
+
left 4
|
3138
|
+
on_toggled{
|
3139
|
+
|
3140
|
+
}
|
3141
|
+
}
|
3104
3142
|
}
|
3105
3143
|
}
|
3106
3144
|
|
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.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: []
|