코딩 (28) 썸네일형 리스트형 [PYTHON] Beautiful soup [HTML과 XML 파일로부터 원하는 데이터를 추출하는 크롤링 라이브러리] from bs4 import BeautifulSoup from urllib.request import urlopen with urlopen('https://en.wikipedia.org/wiki/Main_Page') as response: soup = BeautifulSoup(response, 'html.parser') for anchor in soup.find_all('a'): print(anchor.get('href', '/')) ○ html 내 타이틀, 바디, url, 텍스트 등 필요로 하는 부분만 뽑아서 정렬 가능. ex) 다음사이트의 인기검색어 추출하기 for A in soup.select("div.slide_favors.. [PYTHON] 생활코딩 복습 : 1번째 : 2번째 : 3번째 ######################################################true, false = 불리언 print('Hello ' + 'world') print('Hello ' * 3) print('Hello' [0]) print('Hello' [1]) print('Hello' [2]) print('hello world'.capitalize()) print('hello world'.upper()) print('hello world'.__len__()) print(len('hello world')) print('Hello world'.replace('world', 'programming')) print("goorm's \"tutorial\"") pr.. [PYTHON] 용어 참고 https://www.w3schools.com/python/default.asp Python Tutorial Python Tutorial Learning by Examples With our "Try it Yourself" editor, you can edit the code and view the result. Click on the "Try it Yourself" button to see how it works. Python File Handling In our File Handling section you will learn how to open, read www.w3schools.com https://docs.python.org/3/ [HTML] 용어 참고 https://www.w3schools.com/tags/default.asp HTML Reference www.w3schools.com 이전 1 2 3 4 다음