tblog_zon 0.0.7 → 0.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.
- checksums.yaml +4 -4
- data/lib/tblog_zon.rb +59 -29
- 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: 216b734c2bd1bbec11b5f79fa2775be748bdb7abea914edd09f32b337963f475
|
4
|
+
data.tar.gz: aa0ed7137df4fdd6fd55ed5fd91428a59904f0c599a08e33e25f8a513ba1465d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1af8ea774ff2e6a92a321377855e6a4b3f295e8f5f4bbc6914a0dda6fbfd48469a3854660caf55182844ffb257ada51e1f561f3f676cac7b007514ca2706da16
|
7
|
+
data.tar.gz: 29800c5a50e2ac70249053147a53b075b66fa2f09398a203bb902a5b0795aaf921dc22b5f9b741ecb4d5a4bddc16f953ee20efb745666ff06ff4957be424770c
|
data/lib/tblog_zon.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
require 'glimmer-dsl-libui'
|
2
2
|
require 'selenium-webdriver'
|
3
|
-
|
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
|
-
Selenium::WebDriver::Chrome::Service.driver_path = './chromedriver.exe'
|
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,11 +249,12 @@ class Naver
|
|
249
249
|
|
250
250
|
# 브라우저 실행
|
251
251
|
begin
|
252
|
-
#
|
253
|
-
|
254
|
-
|
255
|
-
#
|
256
|
-
|
252
|
+
# :capabilities에 options를 배열로 전달
|
253
|
+
capabilities = [options]
|
254
|
+
|
255
|
+
# Selenium WebDriver에서 options를 capabilities로 전달
|
256
|
+
@driver = Selenium::WebDriver.for(:chrome, capabilities: capabilities)
|
257
|
+
|
257
258
|
|
258
259
|
sleep(1)
|
259
260
|
# 두 번째 탭에서 로그인 페이지 열기
|
@@ -264,7 +265,11 @@ class Naver
|
|
264
265
|
|
265
266
|
puts "Error: #{e.message}"
|
266
267
|
puts 'Using default Chrome driver without proxy'
|
267
|
-
|
268
|
+
# :capabilities에 options를 배열로 전달
|
269
|
+
capabilities = [options]
|
270
|
+
|
271
|
+
# Selenium WebDriver에서 options를 capabilities로 전달
|
272
|
+
@driver = Selenium::WebDriver.for(:chrome, capabilities: capabilities)
|
268
273
|
|
269
274
|
# 첫 번째 탭에서 확장 프로그램을 로드
|
270
275
|
#@driver.get("chrome-extension://ifibfemgeogfhoebkmokieepdoobkbpo/options/options.html")
|
@@ -1463,10 +1468,19 @@ class Wordpress
|
|
1463
1468
|
|
1464
1469
|
def get_naver_text(q)
|
1465
1470
|
begin
|
1466
|
-
Selenium::WebDriver::Chrome::
|
1467
|
-
|
1471
|
+
options = Selenium::WebDriver::Chrome::Options.new
|
1472
|
+
# :capabilities에 options를 배열로 전달
|
1473
|
+
capabilities = [options]
|
1474
|
+
|
1475
|
+
# Selenium WebDriver에서 options를 capabilities로 전달
|
1476
|
+
@driver = Selenium::WebDriver.for(:chrome, capabilities: capabilities)
|
1468
1477
|
rescue
|
1469
|
-
|
1478
|
+
options = Selenium::WebDriver::Chrome::Options.new
|
1479
|
+
# :capabilities에 options를 배열로 전달
|
1480
|
+
capabilities = [options]
|
1481
|
+
|
1482
|
+
# Selenium WebDriver에서 options를 capabilities로 전달
|
1483
|
+
@driver = Selenium::WebDriver.for(:chrome, capabilities: capabilities)
|
1470
1484
|
end
|
1471
1485
|
@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')
|
1472
1486
|
noko = Nokogiri::HTML(@driver.page_source)
|
@@ -1496,10 +1510,19 @@ class Wordpress
|
|
1496
1510
|
|
1497
1511
|
def get_naver_text2(keyword)
|
1498
1512
|
begin
|
1499
|
-
Selenium::WebDriver::Chrome::
|
1500
|
-
|
1513
|
+
options = Selenium::WebDriver::Chrome::Options.new
|
1514
|
+
# :capabilities에 options를 배열로 전달
|
1515
|
+
capabilities = [options]
|
1516
|
+
|
1517
|
+
# Selenium WebDriver에서 options를 capabilities로 전달
|
1518
|
+
@driver = Selenium::WebDriver.for(:chrome, capabilities: capabilities)
|
1501
1519
|
rescue
|
1502
|
-
|
1520
|
+
options = Selenium::WebDriver::Chrome::Options.new
|
1521
|
+
# :capabilities에 options를 배열로 전달
|
1522
|
+
capabilities = [options]
|
1523
|
+
|
1524
|
+
# Selenium WebDriver에서 options를 capabilities로 전달
|
1525
|
+
@driver = Selenium::WebDriver.for(:chrome, capabilities: capabilities)
|
1503
1526
|
end
|
1504
1527
|
@driver.get('https://search.naver.com/search.naver?ssc=tab.blog.all&sm=tab_jum&query='+keyword.to_s)
|
1505
1528
|
for n3 in 1..10
|
@@ -1542,10 +1565,18 @@ class Wordpress
|
|
1542
1565
|
@user_pw = user_pw
|
1543
1566
|
@captcha_api_key = captcha_api_key
|
1544
1567
|
begin
|
1545
|
-
Selenium::WebDriver::Chrome::
|
1546
|
-
|
1568
|
+
options = Selenium::WebDriver::Chrome::Options.new
|
1569
|
+
# :capabilities에 options를 배열로 전달
|
1570
|
+
capabilities = [options]
|
1571
|
+
|
1572
|
+
# Selenium WebDriver에서 options를 capabilities로 전달
|
1573
|
+
@driver = Selenium::WebDriver.for(:chrome, capabilities: capabilities)
|
1547
1574
|
rescue
|
1548
|
-
|
1575
|
+
# :capabilities에 options를 배열로 전달
|
1576
|
+
capabilities = [options]
|
1577
|
+
|
1578
|
+
# Selenium WebDriver에서 options를 capabilities로 전달
|
1579
|
+
@driver = Selenium::WebDriver.for(:chrome, capabilities: capabilities)
|
1549
1580
|
end
|
1550
1581
|
end
|
1551
1582
|
|
@@ -4014,13 +4045,13 @@ class Wordpress
|
|
4014
4045
|
@data['포스트설정']['내용을자동생성'] = checkbox('키워드기반 생성으로만 등록(GPT 미 사용시 자체 생성)'){
|
4015
4046
|
top 9
|
4016
4047
|
left 0
|
4017
|
-
on_toggled{
|
4018
|
-
|
4019
|
-
|
4020
|
-
|
4021
|
-
|
4022
|
-
|
4023
|
-
|
4048
|
+
on_toggled {
|
4049
|
+
if @data['포스트설정']['내용을자동생성'].checked?
|
4050
|
+
@data['포스트설정']['내용과자동생성'].checked = false
|
4051
|
+
@data['포스트설정']['내용투명'].checked = false
|
4052
|
+
@data['포스트설정']['내용투명'].enabled = false # 비활성화
|
4053
|
+
|
4054
|
+
end
|
4024
4055
|
}
|
4025
4056
|
}
|
4026
4057
|
|
@@ -4033,13 +4064,12 @@ class Wordpress
|
|
4033
4064
|
if @data['포스트설정']['내용과자동생성'].checked?
|
4034
4065
|
@data['포스트설정']['내용을자동생성'].checked = false
|
4035
4066
|
@data['포스트설정']['내용투명'].enabled = true # '내용투명' 활성화
|
4036
|
-
|
4067
|
+
|
4037
4068
|
else
|
4038
4069
|
@data['포스트설정']['내용투명'].checked = false # 체크 해제
|
4039
4070
|
@data['포스트설정']['내용투명'].enabled = false # 비활성화
|
4040
|
-
|
4041
|
-
|
4042
|
-
end
|
4071
|
+
|
4072
|
+
end
|
4043
4073
|
}
|
4044
4074
|
}
|
4045
4075
|
|
@@ -4050,7 +4080,7 @@ class Wordpress
|
|
4050
4080
|
on_toggled {
|
4051
4081
|
if @data['포스트설정']['내용투명'].checked?
|
4052
4082
|
@data['포스트설정']['내용을자동생성'].checked = false
|
4053
|
-
|
4083
|
+
|
4054
4084
|
end
|
4055
4085
|
}
|
4056
4086
|
}
|
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.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- zon
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2025-01-09 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: File to Clipboard gem
|
14
14
|
email: mymin26@naver.com
|