<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>ohke</author_name>
  <author_url>https://blog.hatena.ne.jp/ohke/</author_url>
  <blog_title>け日記</blog_title>
  <blog_url>https://ohke.hateblo.jp/</blog_url>
  <categories>
    <anon>Python</anon>
  </categories>
  <description>Basic認証がかけられたエンドポイントへ、requestsを使ってリクエストする方法です。 $ pip install requests ID/PWでrequests.auth.HTTPBasicAuthを生成し、requestsのメソッド (ここではpost) の auth へ渡してあげるのがポイントです。 HTTPDigestAuthやHTTPProxyAuthも同じように認証できます import requests from requests.auth import HTTPBasicAuth headers = { ... } data = { ... } response = re…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fohke.hateblo.jp%2Fentry%2F2019%2F10%2F05%2F230000&quot; title=&quot;Python: requestsでBasic認証 - け日記&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url>https://cdn.user.blog.st-hatena.com/default_entry_og_image/99455833/1533459624629378</image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2019-10-05 23:00:00</published>
  <title>Python: requestsでBasic認証</title>
  <type>rich</type>
  <url>https://ohke.hateblo.jp/entry/2019/10/05/230000</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
