幹好帥喔

作者: oz5566 (阿康)   2018-12-17 15:25:59
打這樣
for news in soup.select('.img-news-item'):
if len(news.select('h2')) > 0:
h2 = news.select('h2')[0].text
a = news.select('a')[0]['href']
print(h2,a)
連結跟內容就出來ㄌ
挖操好ˋ屌喔
作者: ILoveElsa (S級18位 梓喵醬油瓶)   2018-12-17 15:26:00
程式噁宅閉嘴
作者: oz5566 (阿康)   2018-12-17 15:27:00
幹好屌喔 真的好屌喔
作者: durantjosh (肚爛特‧喬許)   2018-12-17 15:41:00
想轉職當工程師了ㄇ==

Links booklink

Contact Us: admin [ a t ] ucptt.com