#requests
requests는 파이썬 내부에 설치되어있지 않은 패키지인데
이는 HTTP library 이다.
#Requests
#https://pypi.org/=> 다른 사람이 만든 project나 module을 모아둔 곳.
from requests import get
websites = ("google.com", "airbnb.com", "naver.com", "facebook.com",'tiktok.com')
for website in websites:
if not website.startswith("https://"):
website = f"https://{website}"
print(website)
"""
<Response [200]>
<Response [200]>
<Response [200]>
<Response [200]>
<Response [200]>
"""
[Python] 스크래핑 배우기 / Beautifulsoup4 / requests (0) | 2024.01.22 |
---|---|
[Python] classes (2) | 2024.01.19 |
[Python] 딕셔너리(dictionary) (0) | 2024.01.16 |
[Python] data structure ( 데이터 구조 ) (2) | 2024.01.16 |
[Python] while 문, if elif else 문 (0) | 2024.01.15 |