<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>ryuichi1208</author_name>
  <author_url>https://blog.hatena.ne.jp/ryuichi1208/</author_url>
  <blog_title>地方エンジニアの学習日記</blog_title>
  <blog_url>https://ryuichi1208.hateblo.jp/</blog_url>
  <categories>
  </categories>
  <description>httpリクエストの同時実行数制御しつつ色々やりたい時に便利 asyncio.create_task()＋semaphore.acquire()/release() で明示的に並列数を制御 async_timeout を使い 5 秒でタイムアウト 例外が起きても最後まで走らせ、結果を URL ごとに保持 import asyncio import aiohttp import async_timeout CONCURRENCY = 2 # 同時接続上限 TIMEOUT_SEC = 5 # 1 リクエストのタイムアウト async def fetch(url: str, session: aio…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fryuichi1208.hateblo.jp%2Fentry%2F2025%2F05%2F11%2F113006&quot; title=&quot;【Python】async IOでセマフォ - 地方エンジニアの学習日記&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></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2025-05-11 11:30:06</published>
  <title>【Python】async IOでセマフォ</title>
  <type>rich</type>
  <url>https://ryuichi1208.hateblo.jp/entry/2025/05/11/113006</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
