import requests
from bs4 import BeautifulSoup
url =
'http://www.tmica.org.tw/go/3796?time=16:42:28&q1=tolv&q65=2038999&qctrl=2038999&q106=3796&q9='
res = requests.get(url)
res.encoding = 'big5'
soup = BeautifulSoup(res.text,'html.parser')
articles = soup.select(tag_name)
for n in range(1, 20):
next_url =
'http://www.tmica.org.tw/go/3796?time=16:42:28&q1=tolv&q65=2038999&qctrl=2038999&q106=3796&q9='
+ str(n)
url = next_url
for art in articles:
print(url)
東西會變成這樣
重複輸出
http://www.tmica.org.tw/go/3796?time=16:42:28&q1=tolv&q65=2038999&qctrl=2038999&q106=3796&q9=2
20變 才換數字
但把這段砍掉 又正常了
for art in articles:
這是為啥 衝突?