Notice
Recent Posts
Recent Comments
Link
목록request (2)
아미(아름다운미소)
HTTP Request with Python
HTTP GET in Python Python 3: import urllib.request contents = urllib.request.urlopen("http://test.com/?name=test&tel=01022223333").read() Python 2: import urllib2 contents = urllib2.urlopen("http://test.com/?name=test&tel=01022223333").read()
랭귀지/python
2019. 9. 9. 17:12
[python3.0] 웹 스크래핑(네이버 환율 정보)
- 소스 코드(3.0기준)#_*_ coding:utf8 _*_ import urllib.request from bs4 import BeautifulSoup fp = urllib.request.urlopen('http://info.finance.naver.com/marketindex/exchangeList.nhn') source = fp.read() fp.close() class_list = ["tit","sale"] soup = BeautifulSoup(source,'html.parser') soup = soup.find_all("td", class_ = class_list) money_data={} for data in soup: if soup.index(data)%2==0: data=data.get_..
랭귀지/python
2017. 12. 27. 12:30