iT邦幫忙

1

請益爬香港高登討論區,使用selenium無果

即使使用selenium做爬取,html也只會出現以下結果:
https://ithelp.ithome.com.tw/upload/images/20200807/20110934bE72xZRVpC.jpg

程式碼:

!pip install selenium
!apt-get update # to update ubuntu to correctly run apt install
!apt install chromium-chromedriver
!cp /usr/lib/chromium-browser/chromedriver /usr/bin
import sys
sys.path.insert(0,'/usr/lib/chromium-browser/chromedriver')
from selenium import webdriver
chrome_options = webdriver.ChromeOptions()
chrome_options.add_argument('--headless')
chrome_options.add_argument('--no-sandbox')
chrome_options.add_argument('--disable-dev-shm-usage')
wd = webdriver.Chrome('chromedriver',chrome_options=chrome_options)

from bs4 import BeautifulSoup
import re
url = 'https://forum.hkgolden.com/search/T/%E8%82%BA%E7%82%8E'
wd.get(url)
wd.page_source

請問有什麼辦法可以爬嗎?

2 個回答

不明
【**此則訊息已被站方移除**】
1
listennn08
iT邦研究生 1 級 ‧ 2020-08-07 14:05:34

用無頭模式看起來是沒辦法抓
這網頁載入時會帶上 reCAPTCHA
驗證失敗就沒資料

from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
from bs4 import BeautifulSoup
import re

chrome_options = webdriver.ChromeOptions()
# chrome_options.add_argument('--headless')
chrome_options.add_argument('--no-sandbox')
chrome_options.add_argument('--disable-dev-shm-usage')
wd = webdriver.Chrome('chromedriver', options=chrome_options)


try:
  url = 'https://forum.hkgolden.com/search/T/%E8%82%BA%E7%82%8E'
  wd.get(url)
  WebDriverWait(wd, 30).until(
    EC.presence_of_element_located((By.CLASS_NAME, "jss554"))
  )
  # print(wd.page_source)
  soup = BeautifulSoup(wd.page_source, 'html.parser')
  divs = soup.findAll("div", {"class": "jss554"})
  for div in divs:
    print(div)
  wd.quit()
except:
  wd.quit()

result:

<div class="jss554"><div class="jss564 jss551"><a class="jss555" href="/thread/7277147?t=pE2rpg"></a><div class="jss528"><div class="jss531"><div><summary class="jss560">10歲(冠軍)</summary><small class="" title="2020年8月7日 13:58">1 分鐘前</small></div><div><small><svg aria-hidden="true" class="jss296"><use xlink:href="#go-reply"></use></svg>109</small><small><svg aria-hidden="true" class="jss296"><use xlink:href="#good-line"></use></svg>27</small><small><svg aria-hidden="true" class="jss296"><use xlink:href="#bad-line"></use></svg>27</small></div></div><div class="jss548 jss565"><div class="jss543">武漢肺炎算唔算係本世紀最大騙案?<span class="jss570 jss571"><a class="jss569" href="/thread/7277147/page/1?t=DgWQIb">1</a><a class="jss569" href="/thread/7277147/page/2?t=uh87JO">2</a><a class="jss569" href="/thread/7277147/page/3?t=21l5eL">3</a><a class="jss569" href="/thread/7277147/page/4?t=LZ0fHT">4</a><a class="jss569" href="/thread/7277147/page/5?t=TV2azn">5</a><span>頁</span></span></div></div></div><div class="jss535 jss536"><div>時事台</div></div></div></div>
<div class="jss554"><div class="jss564 jss551"><a class="jss555" href="/thread/7279720?t=7ghbvR"></a><div class="jss528"><div class="jss531"><div><summary class="jss559">基本教皇罩梟</summary><small class="" title="2020年8月7日 13:01">1 小時前</small></div><div><small><svg aria-hidden="true" class="jss296"><use xlink:href="#go-reply"></use></svg>2</small><small><svg aria-hidden="true" class="jss296"><use xlink:href="#good-line"></use></svg>1</small><small><svg aria-hidden="true" class="jss296"><use xlink:href="#bad-line"></use></svg>0</small></div></div><div class="jss548 jss565"><div class="jss543">呢個武漢肺炎測試咁平有冇用㗎?</div></div></div><div class="jss535 jss536"><div>學術台</div></div></div></div>
<div class="jss554"><div class="jss564 jss551"><a class="jss555" href="/thread/7256680?t=BBRTza"></a><div class="jss528"><div class="jss531"><div><summary class="jss560">香蕉新地</summary><small class="" title="2020年8月7日 12:18">2 小時前</small></div><div><small><svg aria-hidden="true" class="jss296"><use xlink:href="#go-reply"></use></svg>320</small><small><svg aria-hidden="true" class="jss296"><use xlink:href="#good-line"></use></svg>1</small><small><svg aria-hidden="true" class="jss296"><use xlink:href="#bad-line"></use></svg>0</small></div></div><div class="jss548 jss565"><div class="jss543">[A/I/P] 武漢肺炎 Granblue Fantasy 碧藍幻想 又到6月  (35)<span class="jss570 jss571"><a class="jss569" href="/thread/7256680/page/1?t=qoK8aI">1</a><a class="jss569" href="/thread/7256680/page/2?t=9oVim4">2</a><a class="jss569" href="/thread/7256680/page/3?t=2nzSuK">3</a><a class="jss569" href="/thread/7256680/page/4?t=xWel6G">4</a><span>...</span><a class="jss569" href="/thread/7256680/page/9?t=tZUVGu">9</a><a class="jss569" href="/thread/7256680/page/10?t=vF9xpT">10</a><a class="jss569" href="/thread/7256680/page/11?t=ZfJqFp">11</a><a class="jss569" href="/thread/7256680/page/12?t=G9BoUn">12</a><a class="jss569" href="/thread/7256680/page/13?t=2IgkTx">13</a><span>頁</span></span></div></div></div><div class="jss535 jss536"><div>Apps台</div></div></div></div>
<div class="jss554"><div class="jss564 jss551"><a class="jss555" href="/thread/7279338?t=ORVwzn"></a><div class="jss528"><div class="jss531"><div><summary class="jss560">名字很有霸氣</summary><small class="" title="2020年8月7日 12:02">2 小時前</small></div><div><small><svg aria-hidden="true" class="jss296"><use xlink:href="#go-reply"></use></svg>18</small><small><svg aria-hidden="true" class="jss296"><use xlink:href="#good-line"></use></svg>0</small><small><svg aria-hidden="true" class="jss296"><use xlink:href="#bad-line"></use></svg>1</small></div></div><div class="jss548 jss565"><div class="jss543">(學術研究)今天飲鑵裝氣水怕唔怕肺炎?</div></div></div><div class="jss535 jss536"><div>時事台</div></div></div></div>
<div class="jss554"><div class="jss564 jss551"><a class="jss555" href="/thread/7265038?t=MSFrTp"></a><div class="jss528"><div class="jss531"><div><summary class="jss560">作為電郵轉發</summary><small class="" title="2020年8月7日 09:10">5 小時前</small></div><div><small><svg aria-hidden="true" class="jss296"><use xlink:href="#go-reply"></use></svg>739</small><small><svg aria-hidden="true" class="jss296"><use xlink:href="#good-line"></use></svg>2</small><small><svg aria-hidden="true" class="jss296"><use xlink:href="#bad-line"></use></svg>0</small></div></div><div class="jss548 jss565"><div class="jss543">模型技術交流區(13) 武漢肺炎之逆襲<span class="jss570 jss571"><a class="jss569" href="/thread/7265038/page/1?t=mZBBxy">1</a><a class="jss569" href="/thread/7265038/page/2?t=2HlVoT">2</a><a class="jss569" href="/thread/7265038/page/3?t=ruXJiT">3</a><a class="jss569" href="/thread/7265038/page/4?t=3M3eo6">4</a><span>...</span><a class="jss569" href="/thread/7265038/page/26?t=p8hqug">26</a><a class="jss569" href="/thread/7265038/page/27?t=HXtlvo">27</a><a class="jss569" href="/thread/7265038/page/28?t=vOfnAt">28</a><a class="jss569" href="/thread/7265038/page/29?t=5Qu9OC">29</a><a class="jss569" href="/thread/7265038/page/30?t=2CGn1c">30</a><span>頁</span></span></div></div></div><div class="jss535 jss536"><div>玩具台</div></div></div></div>
<div class="jss554"><div class="jss564 jss551"><a class="jss555" href="/thread/7247225?t=z00ViT"></a><div class="jss528"><div class="jss531"><div><summary class="jss560">膠‧毀滅戰士</summary><small class="" title="2020年8月6日 21:44">16 小時前</small></div><div><small><svg aria-hidden="true" class="jss296"><use xlink:href="#go-reply"></use></svg>224</small><small><svg aria-hidden="true" class="jss296"><use xlink:href="#good-line"></use></svg>1</small><small><svg aria-hidden="true" class="jss296"><use xlink:href="#bad-line"></use></svg>0</small></div></div><div class="jss548 jss565"><div class="jss543">聲優愛好[57] 繼續多拎謝武漢肺炎搞到全球ACG愛好者大炎上<span class="jss570 jss571"><a class="jss569" href="/thread/7247225/page/1?t=cTk5Wb">1</a><a class="jss569" href="/thread/7247225/page/2?t=SQnDwn">2</a><a class="jss569" href="/thread/7247225/page/3?t=O5a8E1">3</a><a class="jss569" href="/thread/7247225/page/4?t=TyzG10">4</a><span>...</span><a class="jss569" href="/thread/7247225/page/5?t=gt2xu4">5</a><a class="jss569" href="/thread/7247225/page/6?t=0eNdX7">6</a><a class="jss569" href="/thread/7247225/page/7?t=7lhBOf">7</a><a class="jss569" href="/thread/7247225/page/8?t=4fH1PG">8</a><a class="jss569" href="/thread/7247225/page/9?t=gCAQsu">9</a><span>頁</span></span></div></div></div><div class="jss535 jss536"><div>動漫台</div></div></div></div>
<div class="jss554"><div class="jss564 jss551"><a class="jss555" href="/thread/7277448?t=W861Gu"></a><div class="jss528"><div class="jss531"><div><summary class="jss560">熱!!</summary><small class="" title="2020年8月6日 20:57">17 小時前</small></div><div><small><svg aria-hidden="true" class="jss296"><use xlink:href="#go-reply"></use></svg>2</small><small><svg aria-hidden="true" class="jss296"><use xlink:href="#good-line"></use></svg>0</small><small><svg aria-hidden="true" class="jss296"><use xlink:href="#bad-line"></use></svg>0</small></div></div><div class="jss548 jss565"><div class="jss543">有無人覺得肺炎唔怕,最怕係成日屈係屋企,無街去,好悶?</div></div></div><div class="jss535 jss536"><div>買賣台</div></div></div></div>
<div class="jss554"><div class="jss564 jss551"><a class="jss555" href="/thread/7279335?t=edRBTQ"></a><div class="jss528"><div class="jss531"><div><summary class="jss560">白粉電子報</summary><small class="" title="2020年8月6日 15:44">1 天前</small></div><div><small><svg aria-hidden="true" class="jss296"><use xlink:href="#go-reply"></use></svg>0</small><small><svg aria-hidden="true" class="jss296"><use xlink:href="#good-line"></use></svg>0</small><small><svg aria-hidden="true" class="jss296"><use xlink:href="#bad-line"></use></svg>0</small></div></div><div class="jss548 jss565"><div class="jss543">香港增90宗新冠肺炎確診 又一城Apple Store職員染病</div></div></div><div class="jss535 jss536"><div>時事台</div></div></div></div>
<div class="jss554"><div class="jss564 jss551"><a class="jss555" href="/thread/7278930?t=DoRsLW"></a><div class="jss528"><div class="jss531"><div><summary class="jss560">馬田奧特加</summary><small class="" title="2020年8月6日 14:34">1 天前</small></div><div><small><svg aria-hidden="true" class="jss296"><use xlink:href="#go-reply"></use></svg>10</small><small><svg aria-hidden="true" class="jss296"><use xlink:href="#good-line"></use></svg>1</small><small><svg aria-hidden="true" class="jss296"><use xlink:href="#bad-line"></use></svg>5</small></div></div><div class="jss548 jss565"><div class="jss543">嘩,連登仔:可靠消息指林鄭中咗武漢肺炎</div></div></div><div class="jss535 jss536"><div>時事台</div></div></div></div>
<div class="jss554"><div class="jss564 jss551"><a class="jss555" href="/thread/7279239?t=8yrb4q"></a><div class="jss528"><div class="jss531"><div><summary class="jss560">闇魔</summary><small class="" title="2020年8月6日 13:51">1 天前</small></div><div><small><svg aria-hidden="true" class="jss296"><use xlink:href="#go-reply"></use></svg>2</small><small><svg aria-hidden="true" class="jss296"><use xlink:href="#good-line"></use></svg>0</small><small><svg aria-hidden="true" class="jss296"><use xlink:href="#bad-line"></use></svg>1</small></div></div><div class="jss548 jss565"><div class="jss543">[殘字]國足利好消息 叙利亞隊七人感染武漢肺炎</div></div></div><div class="jss535 jss536"><div>時事台</div></div></div></div>
<div class="jss554"><div class="jss564 jss551"><a class="jss555" href="/thread/7279211?t=gTyXbz"></a><div class="jss528"><div class="jss531"><div><summary class="jss560">悲傷毒拎</summary><small class="" title="2020年8月6日 12:39">1 天前</small></div><div><small><svg aria-hidden="true" class="jss296"><use xlink:href="#go-reply"></use></svg>0</small><small><svg aria-hidden="true" class="jss296"><use xlink:href="#good-line"></use></svg>0</small><small><svg aria-hidden="true" class="jss296"><use xlink:href="#bad-line"></use></svg>0</small></div></div><div class="jss548 jss565"><div class="jss543">消息:本港新增約90宗新型肺炎確診個案</div></div></div><div class="jss535 jss536"><div>時事台</div></div></div></div>
<div class="jss554"><div class="jss564 jss551"><a class="jss555" href="/thread/7276017?t=8rTHvw"></a><div class="jss528"><div class="jss531"><div><summary class="jss560">香江19</summary><small class="" title="2020年8月6日 10:46">1 天前</small></div><div><small><svg aria-hidden="true" class="jss296"><use xlink:href="#go-reply"></use></svg>50</small><small><svg aria-hidden="true" class="jss296"><use xlink:href="#good-line"></use></svg>8</small><small><svg aria-hidden="true" class="jss296"><use xlink:href="#bad-line"></use></svg>12</small></div></div><div class="jss548 jss565"><div class="jss543">【新冠肺炎】荷蘭政府不建議戴口罩 稱未證防疫效果<span class="jss570 jss571"><a class="jss569" href="/thread/7276017/page/1?t=Ut1vHs">1</a><a class="jss569" href="/thread/7276017/page/2?t=rTDw2S">2</a><span>頁</span></span></div></div></div><div class="jss535 jss536"><div>時事台</div></div></div></div>
<div class="jss554"><div class="jss564 jss551"><a class="jss555" href="/thread/7279148?t=GsPToL"></a><div class="jss528"><div class="jss531"><div><summary class="jss560">飛天意粉神</summary><small class="" title="2020年8月6日 10:43">1 天前</small></div><div><small><svg aria-hidden="true" class="jss296"><use xlink:href="#go-reply"></use></svg>0</small><small><svg aria-hidden="true" class="jss296"><use xlink:href="#good-line"></use></svg>0</small><small><svg aria-hidden="true" class="jss296"><use xlink:href="#bad-line"></use></svg>0</small></div></div><div class="jss548 jss565"><div class="jss543">彭屍係咪中咗肺炎?點解唔見咗佢。</div></div></div><div class="jss535 jss536"><div>時事台</div></div></div></div>
<div class="jss554"><div class="jss564 jss551"><a class="jss555" href="/thread/7278355?t=WlkmTb"></a><div class="jss528"><div class="jss531"><div><summary class="jss560">虎峰</summary><small class="" title="2020年8月6日 01:39">2 天前</small></div><div><small><svg aria-hidden="true" class="jss296"><use xlink:href="#go-reply"></use></svg>18</small><small><svg aria-hidden="true" class="jss296"><use xlink:href="#good-line"></use></svg>5</small><small><svg aria-hidden="true" class="jss296"><use xlink:href="#bad-line"></use></svg>0</small></div></div><div class="jss548 jss565"><div class="jss543">【武漢肺炎】首批確診娛圈中人快速出院 劉少君即約麥德羅歎茶..</div></div></div><div class="jss535 jss536"><div>娛樂台</div></div></div></div>
<div class="jss554"><div class="jss564 jss551"><a class="jss555" href="/thread/7278236?t=frXNpC"></a><div class="jss528"><div class="jss531"><div><summary class="jss560">寶生永夢</summary><small class="" title="2020年8月6日 01:20">2 天前</small></div><div><small><svg aria-hidden="true" class="jss296"><use xlink:href="#go-reply"></use></svg>16</small><small><svg aria-hidden="true" class="jss296"><use xlink:href="#good-line"></use></svg>0</small><small><svg aria-hidden="true" class="jss296"><use xlink:href="#bad-line"></use></svg>0</small></div></div><div class="jss548 jss565"><div class="jss543">聲優 關俊彥 確診武漢肺炎</div></div></div><div class="jss535 jss536"><div>動漫台</div></div></div></div>
<div class="jss554"><div class="jss564 jss551"><a class="jss555" href="/thread/7278727?t=uuekZH"></a><div class="jss528"><div class="jss531"><div><summary class="jss560">闇魔</summary><small class="" title="2020年8月6日 01:16">2 天前</small></div><div><small><svg aria-hidden="true" class="jss296"><use xlink:href="#go-reply"></use></svg>48</small><small><svg aria-hidden="true" class="jss296"><use xlink:href="#good-line"></use></svg>10</small><small><svg aria-hidden="true" class="jss296"><use xlink:href="#bad-line"></use></svg>16</small></div></div><div class="jss548 jss565"><div class="jss543">有傳pk鄧感染武漢肺炎<span class="jss570 jss571"><a class="jss569" href="/thread/7278727/page/1?t=69qZ9n">1</a><a class="jss569" href="/thread/7278727/page/2?t=y8nUUg">2</a><span>頁</span></span></div></div></div><div class="jss535 jss536"><div>時事台</div></div></div></div>
<div class="jss554"><div class="jss564 jss551"><a class="jss555" href="/thread/7276529?t=sVwDpg"></a><div class="jss528"><div class="jss531"><div><summary class="jss560">大HIHI2014</summary><small class="" title="2020年8月3日 08:43">4 天前</small></div><div><small><svg aria-hidden="true" class="jss296"><use xlink:href="#go-reply"></use></svg>20</small><small><svg aria-hidden="true" class="jss296"><use xlink:href="#good-line"></use></svg>0</small><small><svg aria-hidden="true" class="jss296"><use xlink:href="#bad-line"></use></svg>9</small></div></div><div class="jss548 jss565"><div class="jss543">唔想肺炎咁快完,今年儲多左錢</div></div></div><div class="jss535 jss536"><div>上班台</div></div></div></div>
<div class="jss554"><div class="jss564 jss551"><a class="jss555" href="/thread/7276609?t=iMCRCh"></a><div class="jss528"><div class="jss531"><div><summary class="jss560">雨果小子文創</summary><small class="" title="2020年8月3日 05:45">4 天前</small></div><div><small><svg aria-hidden="true" class="jss296"><use xlink:href="#go-reply"></use></svg>22</small><small><svg aria-hidden="true" class="jss296"><use xlink:href="#good-line"></use></svg>0</small><small><svg aria-hidden="true" class="jss296"><use xlink:href="#bad-line"></use></svg>1</small></div></div><div class="jss548 jss565"><div class="jss543">我住棟大廈有人確診肺炎 想得到祝福句子</div></div></div><div class="jss535 jss536"><div>創意台</div></div></div></div>
<div class="jss554"><div class="jss564 jss551"><a class="jss555" href="/thread/7276901?t=1QG8Vc"></a><div class="jss528"><div class="jss531"><div><summary class="jss560">虎峰</summary><small class="" title="2020年8月4日 18:33">3 天前</small></div><div><small><svg aria-hidden="true" class="jss296"><use xlink:href="#go-reply"></use></svg>88</small><small><svg aria-hidden="true" class="jss296"><use xlink:href="#good-line"></use></svg>22</small><small><svg aria-hidden="true" class="jss296"><use xlink:href="#bad-line"></use></svg>40</small></div></div><div class="jss548 jss565"><div class="jss543">【武漢肺炎】收入大減10萬円 今天大屋搬細屋 好難再溝日本妹…<span class="jss570 jss571"><a class="jss569" href="/thread/7276901/page/1?t=LWNpwr">1</a><a class="jss569" href="/thread/7276901/page/2?t=moU43v">2</a><a class="jss569" href="/thread/7276901/page/3?t=TRMGGl">3</a><a class="jss569" href="/thread/7276901/page/4?t=HbFLgP">4</a><span>頁</span></span></div></div></div><div class="jss535 jss536"><div>吹水台</div></div></div></div>
<div class="jss554"><div class="jss564 jss551"><a class="jss555" href="/thread/7277019?t=wAhqzP"></a><div class="jss528"><div class="jss531"><div><summary class="jss560">旺角兄弟</summary><small class="" title="2020年8月2日 09:51">5 天前</small></div><div><small><svg aria-hidden="true" class="jss296"><use xlink:href="#go-reply"></use></svg>1</small><small><svg aria-hidden="true" class="jss296"><use xlink:href="#good-line"></use></svg>0</small><small><svg aria-hidden="true" class="jss296"><use xlink:href="#bad-line"></use></svg>0</small></div></div><div class="jss548 jss565"><div class="jss543">武漢肺炎-大陸人免檢疫搞全民檢測 業界料將港人樣本送中化驗</div></div></div><div class="jss535 jss536"><div>時事台</div></div></div></div>
<div class="jss554"><div class="jss564 jss551"><a class="jss555" href="/thread/7277728?t=3GpUfn"></a><div class="jss528"><div class="jss531"><div><summary class="jss560">闇魔</summary><small class="" title="2020年8月3日 18:10">4 天前</small></div><div><small><svg aria-hidden="true" class="jss296"><use xlink:href="#go-reply"></use></svg>0</small><small><svg aria-hidden="true" class="jss296"><use xlink:href="#good-line"></use></svg>0</small><small><svg aria-hidden="true" class="jss296"><use xlink:href="#bad-line"></use></svg>0</small></div></div><div class="jss548 jss565"><div class="jss543">【武漢肺炎】教育局宣布照常開學 暫停面授課程</div></div></div><div class="jss535 jss536"><div>時事台</div></div></div></div>
<div class="jss554"><div class="jss564 jss551"><a class="jss555" href="/thread/7277929?t=Ppl0J1"></a><div class="jss528"><div class="jss531"><div><summary class="jss560">熱!!</summary><small class="" title="2020年8月4日 16:35">3 天前</small></div><div><small><svg aria-hidden="true" class="jss296"><use xlink:href="#go-reply"></use></svg>1</small><small><svg aria-hidden="true" class="jss296"><use xlink:href="#good-line"></use></svg>0</small><small><svg aria-hidden="true" class="jss296"><use xlink:href="#bad-line"></use></svg>1</small></div></div><div class="jss548 jss565"><div class="jss543">有無人自從肺炎後都無坐過141?</div></div></div><div class="jss535 jss536"><div>吹水台</div></div></div></div>
<div class="jss554"><div class="jss564 jss551"><a class="jss555" href="/thread/7277931?t=C1tu9Z"></a><div class="jss528"><div class="jss531"><div><summary class="jss560">熱!!</summary><small class="" title="2020年8月4日 12:41">3 天前</small></div><div><small><svg aria-hidden="true" class="jss296"><use xlink:href="#go-reply"></use></svg>11</small><small><svg aria-hidden="true" class="jss296"><use xlink:href="#good-line"></use></svg>0</small><small><svg aria-hidden="true" class="jss296"><use xlink:href="#bad-line"></use></svg>0</small></div></div><div class="jss548 jss565"><div class="jss543">成個肺炎最安全既係咪毒能?</div></div></div><div class="jss535 jss536"><div>吹水台</div></div></div></div>
<div class="jss554"><div class="jss564 jss551"><a class="jss555" href="/thread/7278070?t=8Geckm"></a><div class="jss528"><div class="jss531"><div><summary class="jss559">規死人活</summary><small class="" title="2020年8月4日 14:33">3 天前</small></div><div><small><svg aria-hidden="true" class="jss296"><use xlink:href="#go-reply"></use></svg>1</small><small><svg aria-hidden="true" class="jss296"><use xlink:href="#good-line"></use></svg>0</small><small><svg aria-hidden="true" class="jss296"><use xlink:href="#bad-line"></use></svg>0</small></div></div><div class="jss548 jss565"><div class="jss543">中左肺炎的病人屍體係咪一定要火葬?</div></div></div><div class="jss535 jss536"><div>學術台</div></div></div></div>
<div class="jss554"><div class="jss564 jss551"><a class="jss555" href="/thread/7278158?t=BvH2XD"></a><div class="jss528"><div class="jss531"><div><summary class="jss560">行屍走肉</summary><small class="" title="2020年8月4日 23:08">3 天前</small></div><div><small><svg aria-hidden="true" class="jss296"><use xlink:href="#go-reply"></use></svg>20</small><small><svg aria-hidden="true" class="jss296"><use xlink:href="#good-line"></use></svg>4</small><small><svg aria-hidden="true" class="jss296"><use xlink:href="#bad-line"></use></svg>0</small></div></div><div class="jss548 jss565"><div class="jss543">I Cup巨乳女星都中招!天木純確診新冠肺炎</div></div></div><div class="jss538 jss539"><div>公海</div></div><div class="jss535 jss536"><div>娛樂台</div></div></div></div>
<div class="jss554"><div class="jss564 jss551"><a class="jss555" href="/thread/7278162?t=drGCNQ"></a><div class="jss528"><div class="jss531"><div><summary class="jss560">SILVER~~</summary><small class="" title="2020年8月4日 16:59">3 天前</small></div><div><small><svg aria-hidden="true" class="jss296"><use xlink:href="#go-reply"></use></svg>2</small><small><svg aria-hidden="true" class="jss296"><use xlink:href="#good-line"></use></svg>1</small><small><svg aria-hidden="true" class="jss296"><use xlink:href="#bad-line"></use></svg>0</small></div></div><div class="jss548 jss565"><div class="jss543">【武漢肺炎】大媽無視限聚令中環碼頭演唱 認罪罰款三千元</div></div></div><div class="jss535 jss536"><div>時事台</div></div></div></div>
<div class="jss554"><div class="jss564 jss551"><a class="jss555" href="/thread/7278352?t=k0J6ER"></a><div class="jss528"><div class="jss531"><div><summary class="jss560">虎峰</summary><small class="" title="2020年8月5日 16:00">2 天前</small></div><div><small><svg aria-hidden="true" class="jss296"><use xlink:href="#go-reply"></use></svg>31</small><small><svg aria-hidden="true" class="jss296"><use xlink:href="#good-line"></use></svg>2</small><small><svg aria-hidden="true" class="jss296"><use xlink:href="#bad-line"></use></svg>1</small></div></div><div class="jss548 jss565"><div class="jss543">【武漢肺炎】留院一周今晨開心宣佈出院 鄧達智心情大好返屋企<span class="jss570 jss571"><a class="jss569" href="/thread/7278352/page/1?t=VE4elU">1</a><a class="jss569" href="/thread/7278352/page/2?t=8yAfNa">2</a><span>頁</span></span></div></div></div><div class="jss535 jss536"><div>娛樂台</div></div></div></div>
<div class="jss554"><div class="jss564 jss551"><a class="jss555" href="/thread/7278476?t=9QcBbC"></a><div class="jss528"><div class="jss531"><div><summary class="jss560">袁術</summary><small class="" title="2020年8月5日 09:53">2 天前</small></div><div><small><svg aria-hidden="true" class="jss296"><use xlink:href="#go-reply"></use></svg>1</small><small><svg aria-hidden="true" class="jss296"><use xlink:href="#good-line"></use></svg>3</small><small><svg aria-hidden="true" class="jss296"><use xlink:href="#bad-line"></use></svg>0</small></div></div><div class="jss548 jss565"><div class="jss543">武漢肺炎是否已經冇得驚?</div></div></div><div class="jss535 jss536"><div>時事台</div></div></div></div>
<div class="jss554"><div class="jss564 jss551"><a class="jss555" href="/thread/7278762?t=rHTgTV"></a><div class="jss528"><div class="jss531"><div><summary class="jss560">李加誠</summary><small class="" title="2020年8月5日 17:38">2 天前</small></div><div><small><svg aria-hidden="true" class="jss296"><use xlink:href="#go-reply"></use></svg>2</small><small><svg aria-hidden="true" class="jss296"><use xlink:href="#good-line"></use></svg>0</small><small><svg aria-hidden="true" class="jss296"><use xlink:href="#bad-line"></use></svg>1</small></div></div><div class="jss548 jss565"><div class="jss543">網傳鄧炳強感染武漢肺炎 香港警察Facebook:不要跟車太貼</div></div></div><div class="jss535 jss536"><div>時事台</div></div></div></div>
<div class="jss554"><div class="jss564 jss551"><a class="jss555" href="/thread/7278880?t=qeDTfq"></a><div class="jss528"><div class="jss531"><div><summary class="jss559">雕妳?個樣</summary><small class="" title="2020年8月5日 20:07">2 天前</small></div><div><small><svg aria-hidden="true" class="jss296"><use xlink:href="#go-reply"></use></svg>0</small><small><svg aria-hidden="true" class="jss296"><use xlink:href="#good-line"></use></svg>0</small><small><svg aria-hidden="true" class="jss296"><use xlink:href="#bad-line"></use></svg>0</small></div></div><div class="jss548 jss565"><div class="jss543">如果自己隻寵物中武漢肺炎……</div></div></div><div class="jss535 jss536"><div>時事台</div></div></div></div>
Huiicat iT邦新手 5 級 ‧ 2020-08-08 01:31:20 檢舉

請問你在嘗試的時候有遇到拒絕存取嗎?好像管控得蠻嚴格的!才測1-2次就被鎖了

HTTPConnectionPool(host='127.0.0.1', port=56529): Max retries exceeded with url: /session/34a6d7e86390440da786a218e77f7f65/url (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f50485efef0>: Failed to establish a new connection: [Errno 111] Connection refused',))
listennn08 iT邦研究生 1 級 ‧ 2020-08-08 01:37:02 檢舉

沒有欸,只有遇到驗證失敗
他反爬蟲上面下很多功夫,帶 user-agent 也沒用
本來想從 api 去抓
不過 reCAPTCHA 取得方式看起來很複雜就沒研究了

Huiicat iT邦新手 5 級 ‧ 2020-08-08 01:49:37 檢舉

了解,謝謝!我再研究看看

我要發表回答

立即登入回答