soonje_3 7.0.4 → 7.0.9

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 +24 -32
  3. metadata +3 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2c55eede93f30d664bfb192989ae7d1c9eda4d5e9f4fb0f58d5c77251d4b37f9
4
- data.tar.gz: d01a4c55f689cdae34698a3b48b3249081d9d3252f725a538df099aad6e887a5
3
+ metadata.gz: 15739ac2a403979938b053f6bf34d1177f45708e76a7f0bc62ea3677332ce4ed
4
+ data.tar.gz: 49d473e30d312f04c082925c3273e2e17beb1d7efd595994f2c38ed5a7c8657d
5
5
  SHA512:
6
- metadata.gz: 16efa9bd193b0b8e1dce23a8a97f882c92f1c4c84f21874b361d609ddb6b57bb17c9f4c317ce35635d9d6238d2ca54c72df3b16f4d25558642d3a5041d60803c
7
- data.tar.gz: 979f1dbf119ff3805fc3630db496f858c869d47e44ca8ccf64162e3f57f5ab3f16bbde752780f92e1e4e621dbd79e1a575d074f03f84235c96c4b8527c556b88
6
+ metadata.gz: 4f8c5fa0e60f48a1a01836f0ae49cda7cbbcdc68ebe4b90ece95962ba100863b8e7961d811590a9a7637bfa7459d6d967d13e63691737539f4314fbe259191ba
7
+ data.tar.gz: fbb3c14417d9573885a15aa041aea37aa4efcf8cc391fa68b888f49c42710585083820fc1e71707d8d8aa1d91030681eae961ff2298ffd73420e5ccb6a293e0e
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'
@@ -20,9 +20,9 @@ class Wordpress
20
20
  json['url'] = '%2Fbbs%2FbuyListManager7.php'
21
21
  json['mb_id'] = user_id.to_s
22
22
  json['mb_password'] = user_pw.to_s
23
- http = HTTP.post('http://marketingduo.co.kr/bbs/login_check.php', :form => json)
23
+ http = HTTP.post('http://duopro.co.kr/bbs/login_check.php', :form => json)
24
24
  if http.to_s.length == 0
25
- http = HTTP.get('http://marketingduo.co.kr/bbs/buyListManager7.php')
25
+ http = HTTP.get('http://duopro.co.kr/bbs/buyListManager7.php')
26
26
  noko = Nokogiri::HTML(http.to_s)
27
27
  c = noko.xpath('//*[@id="at-main"]/div/table/tbody').to_s.split('<tr>').length-1
28
28
  for n in 1..c
@@ -49,13 +49,13 @@ class Wordpress
49
49
  json['mb_id'] = 'marketingduo'
50
50
  json['mb_password'] = 'mhhs0201'
51
51
 
52
- http = HTTP.post('http://marketingduo.co.kr/bbs/login_check.php', :form => json)
52
+ http = HTTP.post('http://duopro.co.kr/bbs/login_check.php', :form => json)
53
53
  cookie = Hash.new
54
54
  http.cookies.each do |i|
55
55
  cookie[i.to_s.split('=')[0]] = i.to_s.split('=')[1]
56
56
  end
57
57
 
58
- http = HTTP.cookies(cookie).get('http://marketingduo.co.kr/bbs/board.php?bo_table=product&sca=&sfl=wr_subject&sop=and&stx='+userid+'--백링크 등록 프로그램')
58
+ http = HTTP.cookies(cookie).get('http://duopro.co.kr/bbs/board.php?bo_table=product&sca=&sfl=wr_subject&sop=and&stx='+userid+'--백링크 등록 프로그램')
59
59
  noko = Nokogiri::HTML(http.to_s)
60
60
  mac_history = Array.new
61
61
  mac_url = Array.new
@@ -97,14 +97,14 @@ class Wordpress
97
97
  return 1
98
98
  else
99
99
  puts '신규 기기 등록'
100
- http = HTTP.cookies(cookie).post('http://marketingduo.co.kr/bbs/write_token.php', :form => {'bo_table' => 'product'})
100
+ http = HTTP.cookies(cookie).post('http://duopro.co.kr/bbs/write_token.php', :form => {'bo_table' => 'product'})
101
101
  token = http.to_s.split('token":"')[1].split('"')[0]
102
102
  year = Time.now.to_s.split(' ')[0].split('-').join('')
103
103
  year2 = Time.now.to_s.split(' ')[1].split(':').join('')
104
104
  uid = year+year2
105
105
  puts uid
106
106
  json = {'token' => token, 'uid' => uid, 'bo_table' => 'product', 'wr_id' => '0', 'wr_subject' => userid+'--백링크 등록 프로그램', 'wr_content' => mac_address}
107
- http = HTTP.cookies(cookie).post('http://marketingduo.co.kr/bbs/write_update.php', :form => json)
107
+ http = HTTP.cookies(cookie).post('http://duopro.co.kr/bbs/write_update.php', :form => json)
108
108
  return 1
109
109
  end
110
110
  end
@@ -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: 7.0.4
4
+ version: 7.0.9
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-10-02 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.1.6
39
+ rubygems_version: 3.3.7
40
40
  signing_key:
41
41
  specification_version: 4
42
42
  summary: file to clipboard