import requests from bs4 import BeautifulSoup # I am over 18 years old session = requests.Session() session.post('https://www.ptt.cc/ask/over18', data = {'from' : '/bbs/Beauty/M.1563888394.A.F76.html', 'yes' : 'yes'}) # Get html response = session.get('https://www.ptt.cc/bbs/Beauty/M.1563888394.A.F76.html') soup = BeautifulSoup(response.text, 'html.parser') # Get images div_list = soup.find_all('div', class_ = 'richcontent') for div in div_list: print(div.img.get('src')) |
留言共 4 篇留言
前一篇:PTT Beauty 板... 後一篇:Hashing...