tblog_zon 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_zon.rb +16 -47
- 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: a85cc0195395a28b0b56cad3690093b5831b312a36abce95b9f9e9327c8cde37
|
4
|
+
data.tar.gz: d27028ce9783c8ef8696012c0b9cfcc277a7a92b9038f1b6344c7a2e99a1da19
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 622a4ab70ac84c5d9f9593f4441e276266a28761a30ed6b35b183f92534d49cc7b86944b7588e004cf4e039e9d7a77dd56692aa20bb40a849ff705374fa4da89
|
7
|
+
data.tar.gz: 6493c521ac8c5025f6f51b93f5f250cd191edbfde1c39929e8b6699ad83991c620a2df69527abea5bf4f61f934139df7de81c73f94b45747a8fabcef067cba34
|
data/lib/tblog_zon.rb
CHANGED
@@ -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")
|
@@ -1468,19 +1463,10 @@ class Wordpress
|
|
1468
1463
|
|
1469
1464
|
def get_naver_text(q)
|
1470
1465
|
begin
|
1471
|
-
|
1472
|
-
|
1473
|
-
capabilities = [options]
|
1474
|
-
|
1475
|
-
# Selenium WebDriver에서 options를 capabilities로 전달
|
1476
|
-
@driver = Selenium::WebDriver.for(:chrome, capabilities: capabilities)
|
1466
|
+
Selenium::WebDriver::Chrome::Service.driver_path = './chromedriver.exe'
|
1467
|
+
@driver = Selenium::WebDriver.for :chrome
|
1477
1468
|
rescue
|
1478
|
-
|
1479
|
-
# :capabilities에 options를 배열로 전달
|
1480
|
-
capabilities = [options]
|
1481
|
-
|
1482
|
-
# Selenium WebDriver에서 options를 capabilities로 전달
|
1483
|
-
@driver = Selenium::WebDriver.for(:chrome, capabilities: capabilities)
|
1469
|
+
@driver = Selenium::WebDriver.for :chrome
|
1484
1470
|
end
|
1485
1471
|
@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')
|
1486
1472
|
noko = Nokogiri::HTML(@driver.page_source)
|
@@ -1510,19 +1496,10 @@ class Wordpress
|
|
1510
1496
|
|
1511
1497
|
def get_naver_text2(keyword)
|
1512
1498
|
begin
|
1513
|
-
|
1514
|
-
|
1515
|
-
capabilities = [options]
|
1516
|
-
|
1517
|
-
# Selenium WebDriver에서 options를 capabilities로 전달
|
1518
|
-
@driver = Selenium::WebDriver.for(:chrome, capabilities: capabilities)
|
1499
|
+
Selenium::WebDriver::Chrome::Service.driver_path = './chromedriver.exe'
|
1500
|
+
@driver = Selenium::WebDriver.for :chrome
|
1519
1501
|
rescue
|
1520
|
-
|
1521
|
-
# :capabilities에 options를 배열로 전달
|
1522
|
-
capabilities = [options]
|
1523
|
-
|
1524
|
-
# Selenium WebDriver에서 options를 capabilities로 전달
|
1525
|
-
@driver = Selenium::WebDriver.for(:chrome, capabilities: capabilities)
|
1502
|
+
@driver = Selenium::WebDriver.for :chrome
|
1526
1503
|
end
|
1527
1504
|
@driver.get('https://search.naver.com/search.naver?ssc=tab.blog.all&sm=tab_jum&query='+keyword.to_s)
|
1528
1505
|
for n3 in 1..10
|
@@ -1565,18 +1542,10 @@ class Wordpress
|
|
1565
1542
|
@user_pw = user_pw
|
1566
1543
|
@captcha_api_key = captcha_api_key
|
1567
1544
|
begin
|
1568
|
-
|
1569
|
-
|
1570
|
-
capabilities = [options]
|
1571
|
-
|
1572
|
-
# Selenium WebDriver에서 options를 capabilities로 전달
|
1573
|
-
@driver = Selenium::WebDriver.for(:chrome, capabilities: capabilities)
|
1545
|
+
Selenium::WebDriver::Chrome::Service.driver_path = './chromedriver.exe'
|
1546
|
+
@driver = Selenium::WebDriver.for :chrome
|
1574
1547
|
rescue
|
1575
|
-
|
1576
|
-
capabilities = [options]
|
1577
|
-
|
1578
|
-
# Selenium WebDriver에서 options를 capabilities로 전달
|
1579
|
-
@driver = Selenium::WebDriver.for(:chrome, capabilities: capabilities)
|
1548
|
+
@driver = Selenium::WebDriver.for :chrome
|
1580
1549
|
end
|
1581
1550
|
end
|
1582
1551
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tblog_zon
|
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
|