url = "https://service.tp-link.com.cn"
# /detail_download_7539.html
for page in range(1,2):
get_url = './download?classtip=software&p=1'+str(page)+'&o=0'
next_url = urllib.parse.urljoin(url,get_url)
html = requests.get(next_url).text
bs4 = BeautifulSoup(html,"html.parser")
for url1 in bs4.find_all(class_="col1"):
print(url1)
我通过上面这个方法获取了下面一组数据
<th class="col1">名称</th>
<th class="col1"><a href="/detail_download_7353.html">TL-IPC423C(P)-SX V2.0升级软件20191214_1.0.1</a></th>
<th class="col1"><a href="/detail_download_7359.html">TL-WAR1200L V4.0升级软件20191211_1.0.2</a></th>
<th class="col1"><a href="/detail_download_7358.html">TL-FW6300 V1.0升级软件20191214_1.0.1</a></th>
<th class="col1"><a href="/detail_download_7357.html">TL-SL3226P-Combo V4.0升级软件20191111_1.0.1</a></th>
<th class="col1"><a href="/detail_download_7356.html">TL-SL3452-Combo V4.0升级软件20191111_1.0.4</a></th>
<th class="col1"><a href="/detail_download_7355.html">TL-SL5210 V3.0升级软件20191112_1.0.2</a></th>
<th class="col1"><a href="/detail_download_7354.html">TL-SL3210PE V4.0升级软件20191111_1.0.1</a></th>
<th class="col1"><a href="/detail_download_7350.html">TL-IPC534H(P)-WBX V1.0升级软件20191118_1.0.7</a></th>
<th class="col1"><a href="/detail_download_7349.html">TL-IPC43AN-WB4 V1.0升级软件20191203_1.0.4</a></th>
可是我没有办法继续获取到href里面的具体内容,这个应该怎么解决
相似问题