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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/board_posting_duo.rb +21 -35
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 73d6475a9c2f361016fde25d5b40489bdf429fa898ad6fa23a30506d4b6a853c
4
- data.tar.gz: ed6d983d7e262511ba29d853c88697bb29485b44dfd0b3770f13c98b2e4967a4
3
+ metadata.gz: e02bfae261279d07c75fc06e7874fbbf8f7393974cf7af43087f2f87e1896eb1
4
+ data.tar.gz: cae08c6da349169764657e0211cdc1b32657b5cafd3f8693bc440929e1512630
5
5
  SHA512:
6
- metadata.gz: a11c3d91f2d7691edc3a552d2e50580296b7fc01ee874b8c4c44d2154278b6495470a2b0096d879d1c64939e19c79d5b5562492f0cc55868d625e183ea570596
7
- data.tar.gz: e92387782c0bb474a02d07e2849283dff263bf857b90a5f01afb3a1a8c04943e3eeab2179355e6fe1e0a4c0af5551e367c0aaf7431729f23d213284c29fce333
6
+ metadata.gz: 4ac74d5c33c0b203ccd022a128e7147f01d0f6efc66da790057685f4592a9b1273e11165964b648badb2ba196b8b749acb74b293c1c822412efd0580d87cf7c1
7
+ data.tar.gz: 5d7f5677031583c6be7b876f64ba9e2fd0a3d24bd3ccbec5ea9fba3d40b02e67149561cc6c0e79360d95166e3c656f086eeb445ca10b1460dee39116e87314ec
@@ -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://appspace.kr/bbs/login_check.php', :form => json)
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://appspace.kr/bbs/buyListManager7.php')
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://appspace.kr/bbs/login_check.php', :form => json)
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://appspace.kr/bbs/board.php?bo_table=product&sca=&sfl=wr_subject&sop=and&stx='+userid+'--그누보드 게시판 자동 글 등록기')
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://appspace.kr/bbs/write_token.php', :form => {'bo_table' => 'product'})
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://appspace.kr/bbs/write_update.php', :form => json)
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..10
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..4
8398
-
8396
+ for page in 2..5
8399
8397
  begin
8400
- http = HTTP.get('https://search.daum.net/search?w=blog&DA=PGD&enc=utf8&q='+q.to_s.split(' ').join('')+'&p='+page.to_s)
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 '자동 생성 중 (약 1~10초 소요 됨).......'.green
8405
- giri = noko.xpath('//*[@id="blogColl"]/div[3]/ul').to_s
8406
- daum_blog_id = Array.new
8407
- for n in giri.split('<li')[1..-1]
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
- v = noko.xpath('//*[@id="'+blog_id.to_s+'"]/div[2]/div/p').text
8419
- if v != ''
8420
- text_array << v.split('...').join('') + aa33.sample
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.72
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-22 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