soonje_3 5.0.1 → 7.0.7

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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/soonje_3.rb +19 -27
  3. metadata +3 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ff598462b7cf8e0be5d2c24155bbb0b1f6bf773dafa62e2f081acb91063a683b
4
- data.tar.gz: bd49702012e47ddaaa46b71e88386e25a0a3723b237a523117ee575b40d7c8a6
3
+ metadata.gz: '012594d4ace9e0c31b301370a59d025798c158f6056e15e15874f7827e3b57cf'
4
+ data.tar.gz: 990933eba1ca7532266d0ad868941d4db3594c2d808dea28e1082bdb8f1aeccf
5
5
  SHA512:
6
- metadata.gz: 80f19dccd8dd49e11b86d0fc5a9028038062987aa7d6bf190ede0c545bf190273cfd0c28d167e833015867c5defa77363a30fd9031a4b723790c7053555bba95
7
- data.tar.gz: 22e08accbdcd1d9fd3125049da41c41661c4dd4d1fb04d3b421da5d4bf394ac74bd1e3e85ac5fb36d084b6d888ad340e34bc81b51fe7420ee17452833001c1f3
6
+ metadata.gz: 0cb78143c9b5690ad0169cac97d0188255cbcff4bf7eb94a851a6b4c61f2396cdfd463609d28dce63a625bda7df65130d2067d225d4cee9df103e07efa385477
7
+ data.tar.gz: 2948f2d6ec9d71cc0cf4f71487110af786baca43dc31ac092f46d7f42a734afd071d52ddd865467103ec92ffa24f4babd2f2b65c2b1c38ebb967a7bff16e87d7
data/lib/soonje_3.rb CHANGED
@@ -1,7 +1,7 @@
1
1
  require 'glimmer-dsl-libui'
2
2
  require 'nokogiri'
3
3
  require 'http'
4
- require 'nokogiri'
4
+ require 'open-uri'
5
5
  require 'json'
6
6
  require 'down'
7
7
  require 'rmagick'
@@ -152,7 +152,7 @@ class Wordpress
152
152
  text_array = Array.new
153
153
  for page in 1..7
154
154
  begin
155
- 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')
155
+ http = HTTP.get('https://search.zum.com/search.zum?method=blog&option=accu&query='+q.to_s.split(' ').join('')+'&rd=1&page='+page.to_s+'&mm=direct')
156
156
  sleep(1)
157
157
  noko = Nokogiri::HTML(http.to_s)
158
158
  for n in 1..10
@@ -166,40 +166,32 @@ class Wordpress
166
166
  puts 'zum 검색 http error ...'
167
167
  end
168
168
  end
169
-
170
- for page in 2..7
169
+
170
+ for page in 2..5
171
171
  begin
172
- http = HTTP.get('https://search.daum.net/search?w=blog&DA=PGD&enc=utf8&q='+q.to_s.split(' ').join('')+'&p='+page.to_s)
173
- sleep(1)
172
+
173
+ http = HTTP.get('https://search.daum.net/search?w=fusion&col=blog&q='+q.to_s.split(' ').join('')+'&DA=TWA&p='+page.to_s)
174
+ sleep(3)
174
175
  noko = Nokogiri::HTML(http.to_s)
175
- puts http.to_s
176
- puts 'daum ok ...'
177
- giri = noko.xpath('//*[@id="blogColl"]/div[3]/ul').to_s
178
- daum_blog_id = Array.new
179
- for n in giri.split('<li')[1..-1]
180
- begin
181
- daum_blog_id << n.split('id="')[1].split('"')[0]
182
- rescue
183
-
184
- end
185
- end
186
- p daum_blog_id
187
-
188
- for blog_id in daum_blog_id
176
+ #puts http.to_s
177
+ puts '자동글 수집 및 생성 중 (약 5~30초 소요) ...'
178
+ giri = noko.xpath('//c-contents-desc').to_s
179
+ for n in giri.split('</c-contents-desc>')[1..-1]
180
+ #puts n
189
181
  begin
190
- v = noko.xpath('//*[@id="'+blog_id.to_s+'"]/div[2]/div/p').text
191
- if v != ''
192
- text_array << v.split('...').join('')
193
- end
182
+ text_array << n.split('\'>')[1].split('"')[0]
183
+ #puts n.split('>')[1].split('"')[0]
184
+ #puts "\n"
194
185
  rescue
195
-
196
186
  end
197
187
  end
198
188
  rescue
199
-
189
+ puts 'DAUM 검색 http error ...'
200
190
  end
201
191
  end
202
192
 
193
+
194
+
203
195
  return text_array.uniq.shuffle.join("\n")[0..5000]
204
196
  end
205
197
 
@@ -1510,7 +1502,7 @@ class Wordpress
1510
1502
  @data['포스트설정']['내용자동변경값'] = Hash.new
1511
1503
  @data['포스트설정']['막글'] = ''
1512
1504
  @data['포스트설정']['프록시리스트'] = Array.new
1513
- @user_login_ok = 44
1505
+ @user_login_ok = 4
1514
1506
  window('백링크 프로그램', 800, 540) {
1515
1507
  margined true
1516
1508
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: soonje_3
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.0.1
4
+ version: 7.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - soonje
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-01-30 00:00:00.000000000 Z
11
+ date: 2024-09-25 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: File to Clipboard gem
14
14
  email: rnjstnswp123@naver.com
@@ -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.4.10
39
+ rubygems_version: 3.3.7
40
40
  signing_key:
41
41
  specification_version: 4
42
42
  summary: file to clipboard