Example #1
0
async def get_data():
    for path in iglob('data/*'):
        with open(path) as f:
            soup = BeautifulSoup(f.read(), 'html.parser')
            soup._title = path
            yield soup
        await asyncio.sleep(0)