deltago 0.0.1 → 0.0.4
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/deltago.rb +53 -13
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ff759316858e8e9179b2b020c7b79cb9e368dc57b00f40a00aba8b57eb012330
|
4
|
+
data.tar.gz: 6f8f6160bec42028e23275e0c1ae8c1ec24321d49ad10a3212d358d112d44e5d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1524a20468645f925a0c24c032748f3cd55342fb80a1d199d1c0426bcbbb8022095dc67ae0db799de8983308539235a10ba1d98ddc0b8772677d5f8d1a79a77a
|
7
|
+
data.tar.gz: af1b1a254790ed5e9f0781ad8e9ea84f6dc3888058e2ae0d07f9953a8886eec1ec18dffa6167d090598ccf749b2bf26948b769db0f536370dcd829e9daf11568
|
data/lib/deltago.rb
CHANGED
@@ -84,6 +84,19 @@ class Soonje
|
|
84
84
|
|
85
85
|
if @title_file.length == 0
|
86
86
|
title = ''
|
87
|
+
if @title_setting1 == true
|
88
|
+
title = product_data2[0]['title'] + ' ' +title
|
89
|
+
end
|
90
|
+
|
91
|
+
if @keyword_setting1 == true
|
92
|
+
title = @search_text[0] + ' ' + title
|
93
|
+
end
|
94
|
+
|
95
|
+
if @change_text_setting1 == true
|
96
|
+
@change_memory1.each do |key,v|
|
97
|
+
title = (title+'_').split(key).join(v.shuffle[0])
|
98
|
+
end
|
99
|
+
end
|
87
100
|
else
|
88
101
|
title = @title_file.shuffle[0]
|
89
102
|
|
@@ -138,6 +151,9 @@ class Soonje
|
|
138
151
|
|
139
152
|
add_text = ''
|
140
153
|
if @add_text_setting1
|
154
|
+
if search_text[0].to_s == ''
|
155
|
+
search_text = ['가방']
|
156
|
+
end
|
141
157
|
add_text = naver_text(@search_text[0])
|
142
158
|
end
|
143
159
|
|
@@ -201,9 +217,7 @@ class Soonje
|
|
201
217
|
if url_change_check
|
202
218
|
link_url = change_url(link_url)
|
203
219
|
end
|
204
|
-
|
205
|
-
vv = '<img style="text-align: center;" align="center" src="'+dd['image'].to_s.split('212x212').join('500x500')+'">'
|
206
|
-
vv = vv+ '<p style="text-align: center;" align="center">'+dd['productId'].to_s+' => 파일사진위치</p>'
|
220
|
+
vv = '<p style="text-align: center;" align="center">'+dd['productId'].to_s+' => 파일사진위치</p>'
|
207
221
|
vv = vv+ '<div style="text-align: center;" align="center"><span style="font-size: 18pt;">'+dd['title']+'</span></div>'
|
208
222
|
vv = vv+ '<div style="text-align: center;" align="center"><span style="font-size: 18pt; color: #ff4b4b;">'+dd['salesPrice'].to_s+' 원</span></div>'
|
209
223
|
vv = vv+ '<div style="text-align: center;" align="center"><span style="font-size: 10pt;">무료배송</span></div>'
|
@@ -228,8 +242,12 @@ class Soonje
|
|
228
242
|
vv2 += '<div style="text-align: center;" align="center">'+add_text+'</div><br>'
|
229
243
|
end
|
230
244
|
|
231
|
-
|
232
|
-
|
245
|
+
begin
|
246
|
+
Dir.mkdir('./data/'+product[0]['productId'].to_s)
|
247
|
+
rescue
|
248
|
+
|
249
|
+
end
|
250
|
+
File.open('./data/'+product[0]['productId'].to_s+'/'+product[0]['productId'].to_s+'.html', 'w') do |f|
|
233
251
|
f.write(vv2)
|
234
252
|
end
|
235
253
|
|
@@ -242,7 +260,7 @@ class Soonje
|
|
242
260
|
sleep(10)
|
243
261
|
retry
|
244
262
|
end
|
245
|
-
File.open('./data/'+
|
263
|
+
File.open('./data/'+product[0]['productId'].to_s+'/'+dd['productId'].to_s+'.jpg', 'wb') do |f|
|
246
264
|
f.write(http_image.body)
|
247
265
|
end
|
248
266
|
end
|
@@ -348,7 +366,7 @@ class Soonje
|
|
348
366
|
end
|
349
367
|
|
350
368
|
for n in 0..100
|
351
|
-
text3 += text1.shuffle[0..5].join(' ')+text2.shuffle[0]
|
369
|
+
text3 += text1.shuffle[0..5].join(' ')+text2.shuffle[0].to_s
|
352
370
|
end
|
353
371
|
|
354
372
|
max_text = rand(900)+600
|
@@ -362,6 +380,7 @@ class Soonje
|
|
362
380
|
json['mb_id'] = user_id.to_s
|
363
381
|
json['mb_password'] = user_pw.to_s
|
364
382
|
http = HTTP.post('http://marketingduo.co.kr/bbs/login_check.php', :form => json)
|
383
|
+
puts http.to_s
|
365
384
|
if http.to_s.length == 0
|
366
385
|
http = HTTP.get('http://marketingduo.co.kr/bbs/buyListManager7.php')
|
367
386
|
noko = Nokogiri::HTML(http.to_s)
|
@@ -664,7 +683,7 @@ class Soonje
|
|
664
683
|
@add_text_setting2 = json['@add_text_setting2']
|
665
684
|
@tt9.checked = @add_text_setting2
|
666
685
|
@tag_setting = json['@tag_setting']
|
667
|
-
|
686
|
+
@tt10.checked = @tag_setting
|
668
687
|
rescue
|
669
688
|
|
670
689
|
end
|
@@ -730,7 +749,7 @@ class Soonje
|
|
730
749
|
end
|
731
750
|
}
|
732
751
|
|
733
|
-
label('
|
752
|
+
label('포스팅 딜레이'){
|
734
753
|
stretchy false
|
735
754
|
}
|
736
755
|
|
@@ -738,7 +757,7 @@ class Soonje
|
|
738
757
|
stretchy false
|
739
758
|
}
|
740
759
|
|
741
|
-
label('
|
760
|
+
label('포스팅 수량'){
|
742
761
|
stretchy false
|
743
762
|
}
|
744
763
|
|
@@ -746,7 +765,7 @@ class Soonje
|
|
746
765
|
stretchy false
|
747
766
|
}
|
748
767
|
|
749
|
-
button('자동
|
768
|
+
button('자동 홍보 시작'){
|
750
769
|
stretchy false
|
751
770
|
on_clicked do
|
752
771
|
if @user_login_ok == 1
|
@@ -757,7 +776,7 @@ class Soonje
|
|
757
776
|
end
|
758
777
|
}
|
759
778
|
|
760
|
-
button('자동
|
779
|
+
button('자동 홍보 정지'){
|
761
780
|
stretchy false
|
762
781
|
on_clicked do
|
763
782
|
stop()
|
@@ -1353,7 +1372,28 @@ class Soonje
|
|
1353
1372
|
stretchy false
|
1354
1373
|
}
|
1355
1374
|
|
1356
|
-
|
1375
|
+
horizontal_box{
|
1376
|
+
stretchy false
|
1377
|
+
label('★ 마무리 설정'){
|
1378
|
+
stretchy false
|
1379
|
+
}
|
1380
|
+
|
1381
|
+
@tt10 = checkbox('태그 자동 입력'){
|
1382
|
+
stretchy false
|
1383
|
+
on_toggled do |c|
|
1384
|
+
@tag_setting = c.checked?
|
1385
|
+
end
|
1386
|
+
}
|
1387
|
+
|
1388
|
+
#combobox{
|
1389
|
+
# stretchy false
|
1390
|
+
# items('전체공개', '이웃공개', '서로이웃공개' , '비공개')
|
1391
|
+
# selected(0)
|
1392
|
+
# on_selected do |c|
|
1393
|
+
# @open_option = c.selected
|
1394
|
+
# end
|
1395
|
+
#}
|
1396
|
+
}
|
1357
1397
|
}
|
1358
1398
|
}
|
1359
1399
|
}
|