老板帮我看一下这个异步协程哪里有问题

import asyncio
import requests
from requests.packages.urllib3.exceptions import InsecureRequestWarning
import aiohttp
import aiofiles

async def download(line):
async with aiohttp.ClientSession() as session:
async with session.get(line) as resp11:
async with aiofiles.open(line + ".ts", "wb") as f:
await f.write(await resp11.content.read())
print("finished" + line)

async def main():
requests.packages.urllib3.disable_warnings(InsecureRequestWarning)

header = {
    "Accept": "*/*",
    "Accept-Encoding": "gzip, deflate, br",
    "Accept-Language": "zh-CN,zh;q=0.9",
    "Connection": "keep-alive",
    'Host': 'vod1.bdzybf7.com',
    'Origin': 'https://zy.aoxtv.com',
    'sec-ch-ua': '" Not A;Brand";v="99", "Chromium";v="99", "Google Chrome";v="99"',
    'sec-ch-ua-mobile': '?0',
    "sec-ch-ua-platform": "Windows",
    'Sec-Fetch-Dest': 'empty',
    'Sec-Fetch-Mode': 'cors',
    'Sec-Fetch-Site': 'cross-site',
    'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) '
                  'Chrome/99.0.4844.82 Safari/537.36 '
}

m3u8_url = "https://vod1.bdzybf7.com/20220322/SbW6ZUye/2000kb/hls/index.m3u8"
resp = requests.get(url=m3u8_url, headers=header, verify=False)
with open("小电影.m3u8", "wb") as f:
    f.write(resp.content)
tasks = []
with open("小电影.m3u8", "r", encoding="utf-8") as f:
    for line in f:
        line = line.strip()  # 先去掉空格,空行,空白符
        if line.startswith("#"):  # 如果以#开头就去除
            continue
        line = "https://vod1.bdzybf7.com" + line
        tasks.append(asyncio.create_task(download(line)))
    await asyncio.wait(tasks)

if name == 'main':
asyncio.run(main())