Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import aiohttp
- import asyncio
- async def fetch(session, url):
- async with session.get(url) as response:
- return await response.text()
- async def main():
- async with aiohttp.ClientSession() as session:
- url_list = ["https://www.ukr.net/", "https://ukr.segodnya.ua/", "https://korrespondent.net/"]
- sites_has_googleads = []
- for u in url_list:
- html = await fetch(session, u)
- # print(html)
- print("googletagservices" in html)
- if "googletagservices" in html:
- sites_has_googleads.append(u)
- print(f"These {sites_has_googleads} contain googletagservices script")
- if __name__ == '__main__':
- loop = asyncio.get_event_loop()
- loop.run_until_complete(main())
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement