LoginSignup
0
0

More than 5 years have passed since last update.

urllib3を用いたリクエストの手法の自分用メモ

Last updated at Posted at 2019-05-24

urllib3を用いたリクエストの方法


import urllib3
from bs4 import BeautifulSoup

url = '適当なURL'
req = urllib3.PoolManager()
get_result = req.request('GET',url)

soup = BeautifulSoup(get_result.data, 'html.parser')


これでsoupにrequestの結果が取得できたので,BeautifulSoupなどで整形したりする.

0
0
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0