soonje_3 4.0.22 → 4.0.26
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.
Potentially problematic release.
This version of soonje_3 might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/lib/soonje_3.rb +188 -60
- 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: 63e324a78bae12724ef70189020c0b4210547ed290b9ccd883d084791cc39c4f
|
|
4
|
+
data.tar.gz: 9b4385352b0fe16c52bc8fae12db4a1dab29eec64eaf6ee03cc375b37b6a5318
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 161b8a0fcbb8ee1910845ec511cd191b5807c9f42ae24481a3fa4d55c6bf889ecf865f99f685b90ed24eacc7213f5ea6ea211dfeac10329c9fb787cb734bc2aa
|
|
7
|
+
data.tar.gz: 34a66fafe28a8266cb182e69198ce2601f0bb36583cba394bd2b16184fd4fb26d6fd879c063ae6bb2700bc8c5e68f6c49975cf0034a503d6fbabef9ab5e9ba77
|
data/lib/soonje_3.rb
CHANGED
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
require 'glimmer-dsl-libui'
|
|
2
|
-
require 'selenium-webdriver'
|
|
3
|
-
require 'webdrivers'
|
|
4
2
|
require 'nokogiri'
|
|
5
3
|
require 'http'
|
|
6
4
|
require 'nokogiri'
|
|
@@ -34,7 +32,7 @@ class Wordpress
|
|
|
34
32
|
if mac_check(user_id) == 1
|
|
35
33
|
return 1
|
|
36
34
|
else
|
|
37
|
-
return
|
|
35
|
+
return 44
|
|
38
36
|
end
|
|
39
37
|
else
|
|
40
38
|
return 22
|
|
@@ -110,36 +108,97 @@ class Wordpress
|
|
|
110
108
|
end
|
|
111
109
|
end
|
|
112
110
|
|
|
113
|
-
def get_naver_text(q)
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
111
|
+
# def get_naver_text(q)
|
|
112
|
+
# begin
|
|
113
|
+
# # @driver = Selenium::WebDriver.for :chrome
|
|
114
|
+
# # @driver.get('https://search.naver.com/search.naver?display=15&f=&filetype=0&page=3&query='+q.to_s+'&research_url=&sm=tab_pge&start=16&where=web')
|
|
115
|
+
# http2 = HTTP.get('https://search.naver.com/search.naver?display=15&f=&filetype=0&page=3&query='+q.to_s+'&research_url=&sm=tab_pge&start=16&where=web')
|
|
116
|
+
# puts('http html get sleep 5...')
|
|
117
|
+
# sleep(5)
|
|
118
|
+
# noko = Nokogiri::HTML(http2.to_s)
|
|
119
|
+
# tt = noko.xpath('//*[@id="main_pack"]/section/div/ul').text
|
|
120
|
+
# for page in 3..8
|
|
121
|
+
# # @driver.get('https://www.google.com/search?q='+q.to_s+'&start='+(page*10).to_s)
|
|
122
|
+
# http3 = HTTP.get('https://www.google.com/search?q='+q.to_s+'&start='+(page*10).to_s)
|
|
123
|
+
# sleep(2)
|
|
124
|
+
# noko = Nokogiri::HTML(http3.to_s)
|
|
125
|
+
# for n in 1..15
|
|
126
|
+
# tt2 = noko.xpath('//*[@id="rso"]/div['+n.to_s+']/div/div/div[2]/div').text
|
|
127
|
+
# if tt2.length < 5
|
|
128
|
+
|
|
129
|
+
# else
|
|
130
|
+
# tt2 = tt2.split('...').join('')
|
|
131
|
+
# tt += tt2
|
|
132
|
+
# end
|
|
133
|
+
# end
|
|
134
|
+
# end
|
|
135
|
+
# # @driver.close
|
|
136
|
+
# tt = tt.split(' ').shuffle.join(' ')[0..5000]
|
|
137
|
+
# m = Array.new
|
|
138
|
+
# for n in 0..19
|
|
139
|
+
# m << tt[(n*100)..(n*100+100)]
|
|
140
|
+
# end
|
|
141
|
+
# return m.join("\n")
|
|
142
|
+
# rescue
|
|
143
|
+
# puts('naver_text error 재시도 ...')
|
|
144
|
+
# sleep(3)
|
|
145
|
+
# retry
|
|
146
|
+
# end
|
|
147
|
+
# end
|
|
129
148
|
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
149
|
+
def get_naver_text(q)
|
|
150
|
+
text_array = Array.new
|
|
151
|
+
for page in 1..7
|
|
152
|
+
begin
|
|
153
|
+
http = HTTP.get('https://search.zum.com/search.zum?method=blog&option=accu&query='+q.to_s+'&rd=1&page='+page.to_s+'&mm=direct')
|
|
154
|
+
sleep(1)
|
|
155
|
+
noko = Nokogiri::HTML(http.to_s)
|
|
156
|
+
for n in 1..10
|
|
157
|
+
begin
|
|
158
|
+
text_array << noko.xpath('//*[@id="blogItemUl"]/li['+n.to_s+']/dl/dd[2]').text.split('...').join('')
|
|
159
|
+
rescue
|
|
160
|
+
|
|
161
|
+
end
|
|
133
162
|
end
|
|
163
|
+
rescue
|
|
164
|
+
puts 'zum 검색 http error ...'
|
|
134
165
|
end
|
|
135
166
|
end
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
167
|
+
|
|
168
|
+
for page in 2..7
|
|
169
|
+
begin
|
|
170
|
+
http = HTTP.get('https://search.daum.net/search?w=blog&DA=PGD&enc=utf8&q='+q.to_s.split(' ').join('')+'&p='+page.to_s)
|
|
171
|
+
sleep(1)
|
|
172
|
+
noko = Nokogiri::HTML(http.to_s)
|
|
173
|
+
puts http.to_s
|
|
174
|
+
puts 'daum ok ...'
|
|
175
|
+
giri = noko.xpath('//*[@id="blogColl"]/div[3]/ul').to_s
|
|
176
|
+
daum_blog_id = Array.new
|
|
177
|
+
for n in giri.split('<li')[1..-1]
|
|
178
|
+
begin
|
|
179
|
+
daum_blog_id << n.split('id="')[1].split('"')[0]
|
|
180
|
+
rescue
|
|
181
|
+
|
|
182
|
+
end
|
|
183
|
+
end
|
|
184
|
+
p daum_blog_id
|
|
185
|
+
|
|
186
|
+
for blog_id in daum_blog_id
|
|
187
|
+
begin
|
|
188
|
+
v = noko.xpath('//*[@id="'+blog_id.to_s+'"]/div[2]/div/p').text
|
|
189
|
+
if v != ''
|
|
190
|
+
text_array << v.split('...').join('')
|
|
191
|
+
end
|
|
192
|
+
rescue
|
|
193
|
+
|
|
194
|
+
end
|
|
195
|
+
end
|
|
196
|
+
rescue
|
|
197
|
+
|
|
198
|
+
end
|
|
141
199
|
end
|
|
142
|
-
|
|
200
|
+
|
|
201
|
+
return text_array.uniq.shuffle.join("\n")[0..5000]
|
|
143
202
|
end
|
|
144
203
|
|
|
145
204
|
def chrome_start(url, user_id, user_pw)
|
|
@@ -581,7 +640,7 @@ class Wordpress
|
|
|
581
640
|
begin
|
|
582
641
|
status_timeout = Timeout::timeout(180) do
|
|
583
642
|
begin
|
|
584
|
-
if black_users.include?(table[
|
|
643
|
+
if black_users.include?(table[1].to_s)
|
|
585
644
|
next
|
|
586
645
|
end
|
|
587
646
|
if table[4].to_i > table[6].to_i
|
|
@@ -686,7 +745,7 @@ class Wordpress
|
|
|
686
745
|
@data['table'].pop
|
|
687
746
|
login_check = login()
|
|
688
747
|
if login_check == 0
|
|
689
|
-
black_users << table[
|
|
748
|
+
black_users << table[1].to_s
|
|
690
749
|
next
|
|
691
750
|
end
|
|
692
751
|
|
|
@@ -880,7 +939,14 @@ class Wordpress
|
|
|
880
939
|
if @data['포스트설정']['내용과자동생성'].checked?
|
|
881
940
|
content22 = content.split("(자동생성글)")[1].split("\n")
|
|
882
941
|
else
|
|
883
|
-
|
|
942
|
+
if @data['포스트설정']['내용과자동생성'].checked? == false and @data['포스트설정']['내용을자동생성'].checked? == false and @data['포스트설정']['막글삽입'].checked? == true
|
|
943
|
+
snumber = @data['포스트설정']['막글삽입시작숫자'].text.to_s.to_i
|
|
944
|
+
enumber = @data['포스트설정']['막글삽입끝숫자'].text.to_s.to_i
|
|
945
|
+
last_text = @data['포스트설정']['막글'][0..rand(snumber..enumber)].split(' ').shuffle.join(' ')
|
|
946
|
+
content22 = last_text.split(' ')
|
|
947
|
+
else
|
|
948
|
+
content22 = content.split("\n")
|
|
949
|
+
end
|
|
884
950
|
end
|
|
885
951
|
position_point = rand(0..(content22.length-2))
|
|
886
952
|
if position.include?(position_point)
|
|
@@ -910,19 +976,19 @@ class Wordpress
|
|
|
910
976
|
content2 = content.split("\n")
|
|
911
977
|
end
|
|
912
978
|
|
|
913
|
-
while true
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
end
|
|
979
|
+
# while true
|
|
980
|
+
# check10 = 0
|
|
981
|
+
# for nn in 0..position.length-1
|
|
982
|
+
# if content2[position[nn]].to_s.include?('style') or content[position[nn]].to_s.include?('<') or content[position[nn]].to_s.include?('>')
|
|
983
|
+
# check10 = 1
|
|
984
|
+
# position[nn] += 1
|
|
985
|
+
# end
|
|
986
|
+
# end
|
|
987
|
+
# puts 'check10 => '+check10.to_s
|
|
988
|
+
# if check10 == 0
|
|
989
|
+
# break
|
|
990
|
+
# end
|
|
991
|
+
# end
|
|
926
992
|
|
|
927
993
|
|
|
928
994
|
content3 = Array.new
|
|
@@ -970,20 +1036,48 @@ class Wordpress
|
|
|
970
1036
|
end
|
|
971
1037
|
|
|
972
1038
|
if @data['포스트설정']['내용과자동생성'].checked? == false and @data['포스트설정']['내용을자동생성'].checked? == false
|
|
973
|
-
|
|
974
|
-
if
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
1039
|
+
if @data['포스트설정']['내용과자동생성'].checked? == false and @data['포스트설정']['내용을자동생성'].checked? == false
|
|
1040
|
+
if @data['포스트설정']['막글삽입'].checked?
|
|
1041
|
+
position2 = Array.new
|
|
1042
|
+
position3 = Array.new
|
|
1043
|
+
position.each_with_index do |pv, index|
|
|
1044
|
+
position3 << pv
|
|
978
1045
|
end
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
1046
|
+
|
|
1047
|
+
p position2
|
|
1048
|
+
p position3
|
|
1049
|
+
|
|
1050
|
+
content2.each_with_index do |con, index|
|
|
1051
|
+
if position2.include?(index)
|
|
1052
|
+
insert_keyword_text = keyword.to_s
|
|
1053
|
+
if @data['포스트설정']['키워드삽입'].checked?
|
|
1054
|
+
insert_keyword_text = ' <a href="'+@data['포스트설정']['키워드삽입시링크'].text.to_s+'" title="'+keyword.to_s+'">'+insert_keyword_text.to_s+'</a> '
|
|
1055
|
+
end
|
|
1056
|
+
con2 = con.split('')
|
|
1057
|
+
content3 << con2.join('')
|
|
1058
|
+
content3 << insert_keyword_text
|
|
1059
|
+
else
|
|
1060
|
+
content3 << con
|
|
1061
|
+
end
|
|
1062
|
+
end
|
|
1063
|
+
content = content3.join("\n")
|
|
982
1064
|
else
|
|
983
|
-
|
|
1065
|
+
content2.each_with_index do |con, index|
|
|
1066
|
+
if position.include?(index)
|
|
1067
|
+
insert_keyword_text = keyword.to_s
|
|
1068
|
+
if @data['포스트설정']['키워드삽입'].checked?
|
|
1069
|
+
insert_keyword_text = ' <a href="'+@data['포스트설정']['키워드삽입시링크'].text.to_s+'" title="'+keyword.to_s+'">'+insert_keyword_text.to_s+'</a> '
|
|
1070
|
+
end
|
|
1071
|
+
con2 = con.split('')
|
|
1072
|
+
content3 << con2.join('')
|
|
1073
|
+
content3 << insert_keyword_text
|
|
1074
|
+
else
|
|
1075
|
+
content3 << con
|
|
1076
|
+
end
|
|
1077
|
+
end
|
|
1078
|
+
content = content3.join("\n")
|
|
984
1079
|
end
|
|
985
1080
|
end
|
|
986
|
-
content = content3.join("\n")
|
|
987
1081
|
end
|
|
988
1082
|
end
|
|
989
1083
|
|
|
@@ -1167,12 +1261,44 @@ class Wordpress
|
|
|
1167
1261
|
content = content+"\n\n"+content_end
|
|
1168
1262
|
|
|
1169
1263
|
if @data['포스트설정']['막글삽입'].checked?
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1264
|
+
if @data['포스트설정']['내용과자동생성'].checked? == false and @data['포스트설정']['내용을자동생성'].checked? == false and @data['포스트설정']['내용키워드삽입'].checked? == true
|
|
1265
|
+
puts '막글키워드삽입....'
|
|
1266
|
+
content333 = Array.new
|
|
1267
|
+
insert_keyword_text = keyword.to_s
|
|
1268
|
+
if @data['포스트설정']['키워드삽입'].checked?
|
|
1269
|
+
insert_keyword_text = ' <a href="'+@data['포스트설정']['키워드삽입시링크'].text.to_s+'" title="'+keyword.to_s+'">'+insert_keyword_text.to_s+'</a> '
|
|
1270
|
+
end
|
|
1271
|
+
content22 = last_text.split(" ")
|
|
1272
|
+
content22.each_with_index do |con, index|
|
|
1273
|
+
if position3[1..-1].include?(index)
|
|
1274
|
+
insert_keyword_text = keyword.to_s
|
|
1275
|
+
if @data['포스트설정']['키워드삽입'].checked?
|
|
1276
|
+
insert_keyword_text = ' <a href="'+@data['포스트설정']['키워드삽입시링크'].text.to_s+'" title="'+keyword.to_s+'">'+insert_keyword_text.to_s+'</a> '
|
|
1277
|
+
end
|
|
1278
|
+
con2 = con.split('')
|
|
1279
|
+
content333 << con2.join('')
|
|
1280
|
+
content333 << insert_keyword_text
|
|
1281
|
+
else
|
|
1282
|
+
content333 << con
|
|
1283
|
+
end
|
|
1284
|
+
end
|
|
1285
|
+
last_text = content333.join(" ")
|
|
1286
|
+
|
|
1287
|
+
if @data['포스트설정']['막글투명'].checked?
|
|
1288
|
+
content = content + "\n" + insert_keyword_text + "\n" + '<div style="overflow:hidden; width:1px; height:1px" hidden><table width="165" style="width: 124pt; border-collapse: collapse;" border="0" cellspacing="0" cellpadding="0"><tbody><tr height="22" style="height: 16.5pt;"><td width="165" height="22" style="width: 124pt; text-align: center; font-size: 8pt; vertical-align: bottom; white-space: nowrap;">' + last_text + '</td></tr></tbody></table></div>'
|
|
1289
|
+
else
|
|
1290
|
+
content = content + "\n" + insert_keyword_text + "\n" + last_text
|
|
1291
|
+
end
|
|
1174
1292
|
else
|
|
1175
|
-
|
|
1293
|
+
snumber = @data['포스트설정']['막글삽입시작숫자'].text.to_s.to_i
|
|
1294
|
+
enumber = @data['포스트설정']['막글삽입끝숫자'].text.to_s.to_i
|
|
1295
|
+
last_text = @data['포스트설정']['막글'][0..rand(snumber..enumber)].split(' ').shuffle.join(' ')
|
|
1296
|
+
|
|
1297
|
+
if @data['포스트설정']['막글투명'].checked?
|
|
1298
|
+
content = content + '<div style="overflow:hidden; width:1px; height:1px" hidden><table width="165" style="width: 124pt; border-collapse: collapse;" border="0" cellspacing="0" cellpadding="0"><tbody><tr height="22" style="height: 16.5pt;"><td width="165" height="22" style="width: 124pt; text-align: center; font-size: 8pt; vertical-align: bottom; white-space: nowrap;">' + last_text + '</td></tr></tbody></table></div>'
|
|
1299
|
+
else
|
|
1300
|
+
content = content + last_text
|
|
1301
|
+
end
|
|
1176
1302
|
end
|
|
1177
1303
|
end
|
|
1178
1304
|
|
|
@@ -1191,6 +1317,8 @@ class Wordpress
|
|
|
1191
1317
|
@data2['tax_input[post_tag]'] = tag_memory.join(',')
|
|
1192
1318
|
end
|
|
1193
1319
|
|
|
1320
|
+
content = content.split("\n\n").join('')
|
|
1321
|
+
|
|
1194
1322
|
if @data['포스트설정']['중앙정렬'].checked?
|
|
1195
1323
|
content = content.split("\n").map {|row| '<p style="text-align: center;">'+row+'</p>'}.join("\n")
|
|
1196
1324
|
end
|
|
@@ -1301,7 +1429,7 @@ class Wordpress
|
|
|
1301
1429
|
@data['포스트설정']['내용자동변경값'] = Hash.new
|
|
1302
1430
|
@data['포스트설정']['막글'] = ''
|
|
1303
1431
|
@data['포스트설정']['프록시리스트'] = Array.new
|
|
1304
|
-
@user_login_ok =
|
|
1432
|
+
@user_login_ok = 4
|
|
1305
1433
|
window('백링크 프로그램', 800, 540) {
|
|
1306
1434
|
margined true
|
|
1307
1435
|
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: soonje_3
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 4.0.
|
|
4
|
+
version: 4.0.26
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- soonje
|
|
@@ -36,7 +36,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
36
36
|
- !ruby/object:Gem::Version
|
|
37
37
|
version: '0'
|
|
38
38
|
requirements: []
|
|
39
|
-
rubygems_version: 3.3.
|
|
39
|
+
rubygems_version: 3.3.7
|
|
40
40
|
signing_key:
|
|
41
41
|
specification_version: 4
|
|
42
42
|
summary: file to clipboard
|