board_posting_duo 0.0.72 → 0.0.73
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/board_posting_duo.rb +21 -35
- 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: e02bfae261279d07c75fc06e7874fbbf8f7393974cf7af43087f2f87e1896eb1
|
4
|
+
data.tar.gz: cae08c6da349169764657e0211cdc1b32657b5cafd3f8693bc440929e1512630
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4ac74d5c33c0b203ccd022a128e7147f01d0f6efc66da790057685f4592a9b1273e11165964b648badb2ba196b8b749acb74b293c1c822412efd0580d87cf7c1
|
7
|
+
data.tar.gz: 5d7f5677031583c6be7b876f64ba9e2fd0a3d24bd3ccbec5ea9fba3d40b02e67149561cc6c0e79360d95166e3c656f086eeb445ca10b1460dee39116e87314ec
|
data/lib/board_posting_duo.rb
CHANGED
@@ -3,6 +3,7 @@ require 'selenium-webdriver'
|
|
3
3
|
# require 'webdrivers'
|
4
4
|
require 'iconv'
|
5
5
|
require 'nokogiri'
|
6
|
+
require 'open-uri'
|
6
7
|
require 'http'
|
7
8
|
require 'json'
|
8
9
|
require 'down'
|
@@ -8215,14 +8216,12 @@ rescue
|
|
8215
8216
|
|
8216
8217
|
begin
|
8217
8218
|
@driver.close
|
8218
|
-
|
8219
8219
|
rescue
|
8220
8220
|
end
|
8221
8221
|
|
8222
8222
|
rescue => e
|
8223
8223
|
puts '-[√] 글쓰기 페이지 접근 및 코드 탐색 ERROR 발생.......'.red
|
8224
8224
|
@driver.quit
|
8225
|
-
|
8226
8225
|
end
|
8227
8226
|
sleep(1)
|
8228
8227
|
########크롬드라이버 전체 닫기##########
|
@@ -8252,9 +8251,9 @@ class Wordpress
|
|
8252
8251
|
json['url'] = '%2Fbbs%2FbuyListManager7.php'
|
8253
8252
|
json['mb_id'] = user_id.to_s
|
8254
8253
|
json['mb_password'] = user_pw.to_s
|
8255
|
-
http = HTTP.post('http://
|
8254
|
+
http = HTTP.post('http://everyapp.pe.kr/bbs/login_check.php', :form => json)
|
8256
8255
|
if http.to_s.length == 0
|
8257
|
-
http = HTTP.get('http://
|
8256
|
+
http = HTTP.get('http://everyapp.pe.kr/bbs/buyListManager7.php')
|
8258
8257
|
noko = Nokogiri::HTML(http.to_s)
|
8259
8258
|
c = noko.xpath('//*[@id="at-main"]/div/table/tbody').to_s.split('<tr>').length-1
|
8260
8259
|
for n in 1..c
|
@@ -8281,13 +8280,13 @@ class Wordpress
|
|
8281
8280
|
json['mb_id'] = 'marketingduo'
|
8282
8281
|
json['mb_password'] = 'mhhs0201'
|
8283
8282
|
|
8284
|
-
http = HTTP.post('http://
|
8283
|
+
http = HTTP.post('http://everyapp.pe.kr/bbs/login_check.php', :form => json)
|
8285
8284
|
cookie = Hash.new
|
8286
8285
|
http.cookies.each do |i|
|
8287
8286
|
cookie[i.to_s.split('=')[0]] = i.to_s.split('=')[1]
|
8288
8287
|
end
|
8289
8288
|
|
8290
|
-
http = HTTP.cookies(cookie).get('http://
|
8289
|
+
http = HTTP.cookies(cookie).get('http://everyapp.pe.kr/bbs/board.php?bo_table=product&sca=&sfl=wr_subject&sop=and&stx='+userid+'--그누보드 게시판 자동 글 등록기')
|
8291
8290
|
noko = Nokogiri::HTML(http.to_s)
|
8292
8291
|
mac_history = Array.new
|
8293
8292
|
mac_url = Array.new
|
@@ -8327,14 +8326,14 @@ class Wordpress
|
|
8327
8326
|
return 1
|
8328
8327
|
else
|
8329
8328
|
puts '신규 기기 등록'
|
8330
|
-
http = HTTP.cookies(cookie).post('http://
|
8329
|
+
http = HTTP.cookies(cookie).post('http://everyapp.pe.kr/bbs/write_token.php', :form => {'bo_table' => 'product'})
|
8331
8330
|
token = http.to_s.split('token":"')[1].split('"')[0]
|
8332
8331
|
year = Time.now.to_s.split(' ')[0].split('-').join('')
|
8333
8332
|
year2 = Time.now.to_s.split(' ')[1].split(':').join('')
|
8334
8333
|
uid = year+year2
|
8335
8334
|
puts uid
|
8336
8335
|
json = {'token' => token, 'uid' => uid, 'bo_table' => 'product', 'wr_id' => '0', 'wr_subject' => userid+'--그누보드 게시판 자동 글 등록기', 'wr_content' => mac_address}
|
8337
|
-
http = HTTP.cookies(cookie).post('http://
|
8336
|
+
http = HTTP.cookies(cookie).post('http://everyapp.pe.kr/bbs/write_update.php', :form => json)
|
8338
8337
|
return 1
|
8339
8338
|
end
|
8340
8339
|
end
|
@@ -8382,7 +8381,7 @@ class Wordpress
|
|
8382
8381
|
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')
|
8383
8382
|
sleep(3)
|
8384
8383
|
noko = Nokogiri::HTML(http.to_s)
|
8385
|
-
for n in 1..
|
8384
|
+
for n in 1..2
|
8386
8385
|
begin
|
8387
8386
|
text_array << noko.xpath('//*[@id="blogItemUl"]/li['+n.to_s+']/dl/dd[2]').text.split('...').join('') + aa33.sample
|
8388
8387
|
rescue
|
@@ -8394,42 +8393,29 @@ class Wordpress
|
|
8394
8393
|
end
|
8395
8394
|
end
|
8396
8395
|
|
8397
|
-
for page in 2..
|
8398
|
-
|
8396
|
+
for page in 2..5
|
8399
8397
|
begin
|
8400
|
-
|
8398
|
+
|
8399
|
+
http = HTTP.get('https://search.daum.net/search?w=fusion&col=blog&q='+q.to_s.split(' ').join('')+'&DA=TWA&p='+page.to_s)
|
8401
8400
|
sleep(3)
|
8402
8401
|
noko = Nokogiri::HTML(http.to_s)
|
8403
|
-
puts http.to_s
|
8404
|
-
puts '
|
8405
|
-
giri = noko.xpath('
|
8406
|
-
|
8407
|
-
|
8408
|
-
begin
|
8409
|
-
daum_blog_id << n.split('id="')[1].split('"')[0]
|
8410
|
-
rescue
|
8411
|
-
|
8412
|
-
end
|
8413
|
-
end
|
8414
|
-
p daum_blog_id
|
8415
|
-
|
8416
|
-
for blog_id in daum_blog_id
|
8402
|
+
#puts http.to_s
|
8403
|
+
puts '자동글 수집 및 생성 중 (약 5~30초 소요) ...'
|
8404
|
+
giri = noko.xpath('//c-contents-desc').to_s #글만 또는 옆에 이미지있음 같이 블럭씌워지는곳(div class=.... 아래 xpath 의 < 빼고 첫 코드 아래와 동일 xpath)
|
8405
|
+
for n in giri.split('</c-contents-desc>')[1..-1] #div class=.... 아래 xpath 의 < 넣고 / 넣고 첫 코드
|
8406
|
+
#puts n
|
8417
8407
|
begin
|
8418
|
-
|
8419
|
-
|
8420
|
-
|
8421
|
-
end
|
8408
|
+
text_array << n.split('\'>')[1].split('"')[0] #
|
8409
|
+
#puts n.split('>')[1].split('"')[0]
|
8410
|
+
#puts "\n"
|
8422
8411
|
rescue
|
8423
|
-
|
8424
8412
|
end
|
8425
8413
|
end
|
8426
8414
|
rescue
|
8427
|
-
|
8415
|
+
puts 'DAUM 검색 http error ...'
|
8428
8416
|
end
|
8429
8417
|
end
|
8430
|
-
|
8431
|
-
text_array = text_array.shuffle
|
8432
|
-
|
8418
|
+
|
8433
8419
|
return text_array.join("\n")[0..5000]
|
8434
8420
|
end
|
8435
8421
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: board_posting_duo
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.73
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- soonje
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-09-
|
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
|