link
-
[Python] 링크 이용하기언어/Python 2022. 10. 5. 15:24
1. 링크 넣고 제목 따오기 import requests from bs4 import BeautifulSoup html=requests.get('https://entertain.daum.net/ranking/popular').text html=BeautifulSoup(html,"html.parser") print(html.find('a',{'class':'link_txt'}).text) 2.링크 넣고 제목 다 따오기 import requests from bs4 import BeautifulSoup html=requests.get('https://entertain.daum.net/ranking/popular').text html=BeautifulSoup(html,"html.parser") news_tit=..
-
Python etc2언어/Python 2022. 9. 7. 16:22
1. 링크 넣고 제목 따오기 import requests from bs4 import BeautifulSoup html=requests.get('https://entertain.daum.net/ranking/popular').text html=BeautifulSoup(html,"html.parser") print(html.find('a',{'class':'link_txt'}).text) 2.링크 넣고 제목 다 따오기 import requests from bs4 import BeautifulSoup html=requests.get('https://entertain.daum.net/ranking/popular').text html=BeautifulSoup(html,"html.parser") news_tit=..