tblog_duopack 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_duopack.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: 1c2492b0fa5a0d65287cd0b9ac27017363f1e9df73282bfffc3e7d9666253e52
|
4
|
+
data.tar.gz: e0346713a5ae4c02b4dacb6dc0c0cbc098879e59a63d97f3a7eee83288c56884
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2ea90b379b8f5068fab36f4cf363321e470c8e27b4adc6b053683bad6bf43c01f7d46cec75e1e01ec2b4376c4d7106ae6b342981b8e92f7e930e9c669ffdb9bb
|
7
|
+
data.tar.gz: df57c47410e2a80e30c4be8abd271d69554356f63537bc247b68d0aaea3cf7b4570a6cb9f98d594a562bf854f1a6965d484d785a79a25a9797fb0f29e57ea896
|
data/lib/tblog_duopack.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")
|
@@ -1502,10 +1507,19 @@ class Wordpress
|
|
1502
1507
|
|
1503
1508
|
def get_naver_text(q)
|
1504
1509
|
begin
|
1505
|
-
Selenium::WebDriver::Chrome::
|
1506
|
-
|
1510
|
+
options = Selenium::WebDriver::Chrome::Options.new
|
1511
|
+
# :capabilities에 options를 배열로 전달
|
1512
|
+
capabilities = [options]
|
1513
|
+
|
1514
|
+
# Selenium WebDriver에서 options를 capabilities로 전달
|
1515
|
+
@driver = Selenium::WebDriver.for(:chrome, capabilities: capabilities)
|
1507
1516
|
rescue
|
1508
|
-
|
1517
|
+
options = Selenium::WebDriver::Chrome::Options.new
|
1518
|
+
# :capabilities에 options를 배열로 전달
|
1519
|
+
capabilities = [options]
|
1520
|
+
|
1521
|
+
# Selenium WebDriver에서 options를 capabilities로 전달
|
1522
|
+
@driver = Selenium::WebDriver.for(:chrome, capabilities: capabilities)
|
1509
1523
|
end
|
1510
1524
|
@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')
|
1511
1525
|
noko = Nokogiri::HTML(@driver.page_source)
|
@@ -1535,10 +1549,19 @@ class Wordpress
|
|
1535
1549
|
|
1536
1550
|
def get_naver_text2(keyword)
|
1537
1551
|
begin
|
1538
|
-
Selenium::WebDriver::Chrome::
|
1539
|
-
|
1552
|
+
options = Selenium::WebDriver::Chrome::Options.new
|
1553
|
+
# :capabilities에 options를 배열로 전달
|
1554
|
+
capabilities = [options]
|
1555
|
+
|
1556
|
+
# Selenium WebDriver에서 options를 capabilities로 전달
|
1557
|
+
@driver = Selenium::WebDriver.for(:chrome, capabilities: capabilities)
|
1540
1558
|
rescue
|
1541
|
-
|
1559
|
+
options = Selenium::WebDriver::Chrome::Options.new
|
1560
|
+
# :capabilities에 options를 배열로 전달
|
1561
|
+
capabilities = [options]
|
1562
|
+
|
1563
|
+
# Selenium WebDriver에서 options를 capabilities로 전달
|
1564
|
+
@driver = Selenium::WebDriver.for(:chrome, capabilities: capabilities)
|
1542
1565
|
end
|
1543
1566
|
@driver.get('https://search.naver.com/search.naver?ssc=tab.blog.all&sm=tab_jum&query='+keyword.to_s)
|
1544
1567
|
for n3 in 1..10
|
@@ -1581,10 +1604,18 @@ class Wordpress
|
|
1581
1604
|
@user_pw = user_pw
|
1582
1605
|
@captcha_api_key = captcha_api_key
|
1583
1606
|
begin
|
1584
|
-
Selenium::WebDriver::Chrome::
|
1585
|
-
|
1607
|
+
options = Selenium::WebDriver::Chrome::Options.new
|
1608
|
+
# :capabilities에 options를 배열로 전달
|
1609
|
+
capabilities = [options]
|
1610
|
+
|
1611
|
+
# Selenium WebDriver에서 options를 capabilities로 전달
|
1612
|
+
@driver = Selenium::WebDriver.for(:chrome, capabilities: capabilities)
|
1586
1613
|
rescue
|
1587
|
-
|
1614
|
+
# :capabilities에 options를 배열로 전달
|
1615
|
+
capabilities = [options]
|
1616
|
+
|
1617
|
+
# Selenium WebDriver에서 options를 capabilities로 전달
|
1618
|
+
@driver = Selenium::WebDriver.for(:chrome, capabilities: capabilities)
|
1588
1619
|
end
|
1589
1620
|
end
|
1590
1621
|
|
@@ -4059,13 +4090,13 @@ class Wordpress
|
|
4059
4090
|
@data['포스트설정']['내용을자동생성'] = checkbox('키워드기반 생성으로만 등록(GPT 미 사용시 자체 생성)'){
|
4060
4091
|
top 9
|
4061
4092
|
left 0
|
4062
|
-
on_toggled{
|
4063
|
-
|
4064
|
-
|
4065
|
-
|
4066
|
-
|
4067
|
-
|
4068
|
-
|
4093
|
+
on_toggled {
|
4094
|
+
if @data['포스트설정']['내용을자동생성'].checked?
|
4095
|
+
@data['포스트설정']['내용과자동생성'].checked = false
|
4096
|
+
@data['포스트설정']['내용투명'].checked = false
|
4097
|
+
@data['포스트설정']['내용투명'].enabled = false # 비활성화
|
4098
|
+
|
4099
|
+
end
|
4069
4100
|
}
|
4070
4101
|
}
|
4071
4102
|
|
@@ -4078,13 +4109,12 @@ class Wordpress
|
|
4078
4109
|
if @data['포스트설정']['내용과자동생성'].checked?
|
4079
4110
|
@data['포스트설정']['내용을자동생성'].checked = false
|
4080
4111
|
@data['포스트설정']['내용투명'].enabled = true # '내용투명' 활성화
|
4081
|
-
|
4112
|
+
|
4082
4113
|
else
|
4083
4114
|
@data['포스트설정']['내용투명'].checked = false # 체크 해제
|
4084
4115
|
@data['포스트설정']['내용투명'].enabled = false # 비활성화
|
4085
|
-
|
4086
|
-
|
4087
|
-
end
|
4116
|
+
|
4117
|
+
end
|
4088
4118
|
}
|
4089
4119
|
}
|
4090
4120
|
|
@@ -4095,7 +4125,7 @@ class Wordpress
|
|
4095
4125
|
on_toggled {
|
4096
4126
|
if @data['포스트설정']['내용투명'].checked?
|
4097
4127
|
@data['포스트설정']['내용을자동생성'].checked = false
|
4098
|
-
|
4128
|
+
|
4099
4129
|
end
|
4100
4130
|
}
|
4101
4131
|
}
|
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.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
|