zon_blog_cafe_comment 0.0.57 → 0.0.61
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/zon_blog_cafe_comment.rb +37 -36
- 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: 3948c43ce2529657d53c6bdae7638ef1cd545115ae94ac8dc5fc3da58e94c8ae
|
4
|
+
data.tar.gz: b663e7b7be16e3ec4a39b0f0aaddc5dd2ddb6d9a033b38d5cf6a3dfdc0f0410f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 813bef3f1d23e188e02417f9826c6cf87ca2b71b19b3b2455a7d36b339a5505270d9199d9c00ae7bff06651513898f9dcd493919007f35bcce8040348894dd88
|
7
|
+
data.tar.gz: e9bd7194c0d2e338d286c7623bccfd71d28bef77ee0eb0b9b23a484f9ebfc749f9222e120af32dff6f210b1feaef387d3b290d26820fb627bcf5c1e944d0333a
|
@@ -1550,48 +1550,60 @@ class Naver
|
|
1550
1550
|
@driver.switch_to.frame(@driver.find_element(:xpath, '//*[@id="mainFrame"]')) # 아이프레임 선택
|
1551
1551
|
sleep(1)
|
1552
1552
|
begin
|
1553
|
-
|
1554
|
-
|
1555
|
-
|
1553
|
+
element = @driver.find_element(:xpath, '//*[@id="toplistSpanBlind"]') # 목록 열기 코드
|
1554
|
+
text = element.text.strip
|
1555
|
+
|
1556
|
+
if text == "목록열기"
|
1557
|
+
element.click
|
1558
|
+
sleep(2)
|
1559
|
+
else
|
1560
|
+
|
1561
|
+
end
|
1562
|
+
rescue
|
1556
1563
|
begin
|
1557
|
-
@driver.find_element(:xpath, '//*[@class="off itemfont _doNclick _param(false|blog|)"]').click
|
1558
|
-
sleep(2)
|
1564
|
+
@driver.find_element(:xpath, '//*[@class="off itemfont _doNclick _param(false|blog|)"]').click #블로그 txt 클릭
|
1565
|
+
sleep(2)
|
1566
|
+
rescue
|
1567
|
+
begin
|
1568
|
+
@driver.find_element(:xpath, '//*[@class="on itemfont _doNclick _param(false|blog|)"]').click #블로그 txt 클릭
|
1569
|
+
sleep(2)
|
1570
|
+
rescue
|
1571
|
+
end
|
1572
|
+
end
|
1573
|
+
|
1574
|
+
begin
|
1559
1575
|
begin
|
1560
1576
|
wait = Selenium::WebDriver::Wait.new(:timeout => 5)
|
1561
|
-
wait.until { @driver.find_element(:xpath, '//*[@id="category0"]') }
|
1577
|
+
wait.until { @driver.find_element(:xpath, '//*[@id="category0"]') } # 전체 보기 클릭
|
1562
1578
|
element = @driver.find_element(:xpath, '//*[@id="category0"]')
|
1563
1579
|
@driver.execute_script("arguments[0].scrollIntoView({block: 'center', inline: 'center'})", element)#크롤 이동
|
1564
1580
|
sleep(2)
|
1565
|
-
@driver.find_element(:xpath, '//*[@id="category0"]').click
|
1581
|
+
@driver.find_element(:xpath, '//*[@id="category0"]').click # 전체 보기 클릭
|
1566
1582
|
sleep(2)
|
1567
1583
|
rescue
|
1568
1584
|
end
|
1569
1585
|
wait = Selenium::WebDriver::Wait.new(:timeout => 5)
|
1570
|
-
wait.until { @driver.find_element(:xpath, '//*[@id="toplistSpanBlind"]') }
|
1586
|
+
wait.until { @driver.find_element(:xpath, '//*[@id="toplistSpanBlind"]') } # 목록 열기 코드
|
1571
1587
|
element = @driver.find_element(:xpath, '//*[@id="toplistSpanBlind"]')
|
1572
1588
|
@driver.execute_script("arguments[0].scrollIntoView({block: 'center', inline: 'center'})", element)#크롤 이동
|
1573
|
-
sleep(2)
|
1574
|
-
@driver.find_element(:xpath, '//*[@id="toplistSpanBlind"]')
|
1575
|
-
|
1576
|
-
|
1577
|
-
|
1578
|
-
|
1579
|
-
|
1580
|
-
|
1581
|
-
puts 'id="toplistSpanBlind" 요소를 찾지 못했습니다.'
|
1582
|
-
@driver.close
|
1583
|
-
rescue Selenium::WebDriver::Error::WebDriverError => e
|
1584
|
-
puts "Failed to close tab: #{e.message}"
|
1585
|
-
end
|
1589
|
+
sleep(2)
|
1590
|
+
element = @driver.find_element(:xpath, '//*[@id="toplistSpanBlind"]')
|
1591
|
+
text = element.text.strip
|
1592
|
+
|
1593
|
+
if text == "목록열기"
|
1594
|
+
element.click
|
1595
|
+
sleep(2)
|
1596
|
+
else
|
1586
1597
|
end
|
1587
|
-
|
1598
|
+
sleep(1)
|
1599
|
+
rescue
|
1588
1600
|
end
|
1589
1601
|
end
|
1590
1602
|
|
1591
1603
|
|
1592
1604
|
begin
|
1593
1605
|
wait = Selenium::WebDriver::Wait.new(:timeout => 3)
|
1594
|
-
wait.until { @driver.find_element(:xpath, '//*[@class="aline"]') }
|
1606
|
+
wait.until { @driver.find_element(:xpath, '//*[@class="aline"]') } # 목록 리스트 (5줄 보기) 클릭
|
1595
1607
|
element = @driver.find_element(:xpath, '//*[@class="aline"]')
|
1596
1608
|
@driver.execute_script("arguments[0].scrollIntoView({block: 'center', inline: 'center'})", element)#크롤 이동
|
1597
1609
|
sleep(2)
|
@@ -1600,24 +1612,13 @@ class Naver
|
|
1600
1612
|
rescue
|
1601
1613
|
begin
|
1602
1614
|
wait = Selenium::WebDriver::Wait.new(:timeout => 3)
|
1603
|
-
wait.until { @driver.find_element(:xpath, '//*[@id="listCountToggle"]') }
|
1615
|
+
wait.until { @driver.find_element(:xpath, '//*[@id="listCountToggle"]') } # 목록 리스트 (5줄 보기) 클릭
|
1604
1616
|
element = @driver.find_element(:xpath, '//*[@id="listCountToggle"]')
|
1605
1617
|
@driver.execute_script("arguments[0].scrollIntoView({block: 'center', inline: 'center'})", element)#크롤 이동
|
1606
1618
|
sleep(2)
|
1607
1619
|
element.send_keys(:return)
|
1608
1620
|
sleep(1)
|
1609
|
-
rescue
|
1610
|
-
@driver.window_handles.each do |handle|
|
1611
|
-
@driver.switch_to.window(handle)
|
1612
|
-
begin
|
1613
|
-
# 로딩 중이거나, 페이지가 완전히 로딩되지 않더라도 탭을 닫기
|
1614
|
-
puts 'class="aline" 요소를 찾지 못했습니다.'
|
1615
|
-
@driver.close
|
1616
|
-
rescue Selenium::WebDriver::Error::WebDriverError => e
|
1617
|
-
puts "Failed to close tab: #{e.message}"
|
1618
|
-
end
|
1619
|
-
end
|
1620
|
-
@driver.quit
|
1621
|
+
rescue
|
1621
1622
|
end
|
1622
1623
|
end
|
1623
1624
|
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: zon_blog_cafe_comment
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.61
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- zon
|
8
8
|
bindir: bin
|
9
9
|
cert_chain: []
|
10
|
-
date: 2025-06-
|
10
|
+
date: 2025-06-19 00:00:00.000000000 Z
|
11
11
|
dependencies: []
|
12
12
|
description: File to Clipboard gem
|
13
13
|
email: mymin26@naver.com
|