tblog_duopack 0.0.9 → 0.0.13
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/tblog_duopack.rb +17 -48
- 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: bc9763e2439e0dc25023dce673e8245f808f988728ef392ec557ca3ffbca9e9f
|
4
|
+
data.tar.gz: 60d5cc3b58cdd408bb783e6037f58f53cb4edd2bc32e22d53c6456aa95d790e7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 65b5b52e4b3b78f3c2408e27d34b0b61b1b5cb64534779f72240b8fdad546cba12334bae29130d02093527201f776a4659e3b9fe93b6080bc20ed1d1cbc410ab
|
7
|
+
data.tar.gz: f0f6db151b130e4d765b4f54716a0970db7a4edc5e2d976c0b3001f1e4fd122e9321e3c971dd4893f9443b4b392186743e3fb62d9f8801089da0585fed9cf9ad
|
data/lib/tblog_duopack.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
require 'glimmer-dsl-libui'
|
2
2
|
require 'selenium-webdriver'
|
3
|
-
require 'webdrivers'
|
3
|
+
# require 'webdrivers'
|
4
4
|
require 'iconv'
|
5
5
|
require 'nokogiri'
|
6
6
|
require 'http'
|
@@ -212,7 +212,7 @@ class Naver
|
|
212
212
|
|
213
213
|
def chrome_start(proxy)
|
214
214
|
# 공통 옵션 설정
|
215
|
-
|
215
|
+
Selenium::WebDriver::Chrome::Service.driver_path = './chromedriver.exe'
|
216
216
|
options = Selenium::WebDriver::Chrome::Options.new
|
217
217
|
|
218
218
|
options.add_extension('./crx/app.crx') # 확장 프로그램을 첫 번째 탭에 추가
|
@@ -249,12 +249,11 @@ class Naver
|
|
249
249
|
|
250
250
|
# 브라우저 실행
|
251
251
|
begin
|
252
|
-
#
|
253
|
-
|
254
|
-
|
255
|
-
#
|
256
|
-
|
257
|
-
|
252
|
+
# 새 드라이버 실행
|
253
|
+
@driver = Selenium::WebDriver.for(:chrome, options: options)
|
254
|
+
|
255
|
+
# 첫 번째 탭에서 확장 프로그램을 로드
|
256
|
+
#@driver.get("chrome-extension://ifibfemgeogfhoebkmokieepdoobkbpo/options/options.html")
|
258
257
|
|
259
258
|
sleep(1)
|
260
259
|
# 두 번째 탭에서 로그인 페이지 열기
|
@@ -265,11 +264,7 @@ class Naver
|
|
265
264
|
|
266
265
|
puts "Error: #{e.message}"
|
267
266
|
puts 'Using default Chrome driver without proxy'
|
268
|
-
|
269
|
-
capabilities = [options]
|
270
|
-
|
271
|
-
# Selenium WebDriver에서 options를 capabilities로 전달
|
272
|
-
@driver = Selenium::WebDriver.for(:chrome, capabilities: capabilities)
|
267
|
+
@driver = Selenium::WebDriver.for(:chrome, options: options)
|
273
268
|
|
274
269
|
# 첫 번째 탭에서 확장 프로그램을 로드
|
275
270
|
#@driver.get("chrome-extension://ifibfemgeogfhoebkmokieepdoobkbpo/options/options.html")
|
@@ -1507,19 +1502,10 @@ class Wordpress
|
|
1507
1502
|
|
1508
1503
|
def get_naver_text(q)
|
1509
1504
|
begin
|
1510
|
-
|
1511
|
-
|
1512
|
-
capabilities = [options]
|
1513
|
-
|
1514
|
-
# Selenium WebDriver에서 options를 capabilities로 전달
|
1515
|
-
@driver = Selenium::WebDriver.for(:chrome, capabilities: capabilities)
|
1505
|
+
Selenium::WebDriver::Chrome::Service.driver_path = './chromedriver.exe'
|
1506
|
+
@driver = Selenium::WebDriver.for :chrome
|
1516
1507
|
rescue
|
1517
|
-
|
1518
|
-
# :capabilities에 options를 배열로 전달
|
1519
|
-
capabilities = [options]
|
1520
|
-
|
1521
|
-
# Selenium WebDriver에서 options를 capabilities로 전달
|
1522
|
-
@driver = Selenium::WebDriver.for(:chrome, capabilities: capabilities)
|
1508
|
+
@driver = Selenium::WebDriver.for :chrome
|
1523
1509
|
end
|
1524
1510
|
@driver.get('https://search.naver.com/search.naver?display=15&f=&filetype=0&page=3&query='+q.to_s+'&research_url=&sm=tab_pge&start=16&where=web')
|
1525
1511
|
noko = Nokogiri::HTML(@driver.page_source)
|
@@ -1549,19 +1535,10 @@ class Wordpress
|
|
1549
1535
|
|
1550
1536
|
def get_naver_text2(keyword)
|
1551
1537
|
begin
|
1552
|
-
|
1553
|
-
|
1554
|
-
capabilities = [options]
|
1555
|
-
|
1556
|
-
# Selenium WebDriver에서 options를 capabilities로 전달
|
1557
|
-
@driver = Selenium::WebDriver.for(:chrome, capabilities: capabilities)
|
1538
|
+
Selenium::WebDriver::Chrome::Service.driver_path = './chromedriver.exe'
|
1539
|
+
@driver = Selenium::WebDriver.for :chrome
|
1558
1540
|
rescue
|
1559
|
-
|
1560
|
-
# :capabilities에 options를 배열로 전달
|
1561
|
-
capabilities = [options]
|
1562
|
-
|
1563
|
-
# Selenium WebDriver에서 options를 capabilities로 전달
|
1564
|
-
@driver = Selenium::WebDriver.for(:chrome, capabilities: capabilities)
|
1541
|
+
@driver = Selenium::WebDriver.for :chrome
|
1565
1542
|
end
|
1566
1543
|
@driver.get('https://search.naver.com/search.naver?ssc=tab.blog.all&sm=tab_jum&query='+keyword.to_s)
|
1567
1544
|
for n3 in 1..10
|
@@ -1604,18 +1581,10 @@ class Wordpress
|
|
1604
1581
|
@user_pw = user_pw
|
1605
1582
|
@captcha_api_key = captcha_api_key
|
1606
1583
|
begin
|
1607
|
-
|
1608
|
-
|
1609
|
-
capabilities = [options]
|
1610
|
-
|
1611
|
-
# Selenium WebDriver에서 options를 capabilities로 전달
|
1612
|
-
@driver = Selenium::WebDriver.for(:chrome, capabilities: capabilities)
|
1584
|
+
Selenium::WebDriver::Chrome::Service.driver_path = './chromedriver.exe'
|
1585
|
+
@driver = Selenium::WebDriver.for :chrome
|
1613
1586
|
rescue
|
1614
|
-
|
1615
|
-
capabilities = [options]
|
1616
|
-
|
1617
|
-
# Selenium WebDriver에서 options를 capabilities로 전달
|
1618
|
-
@driver = Selenium::WebDriver.for(:chrome, capabilities: capabilities)
|
1587
|
+
@driver = Selenium::WebDriver.for :chrome
|
1619
1588
|
end
|
1620
1589
|
end
|
1621
1590
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tblog_duopack
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.13
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- zon
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-01-
|
11
|
+
date: 2025-01-20 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: File to Clipboard gem
|
14
14
|
email: mymin26@naver.com
|