Added async support

This commit is contained in:
UrloMythus
2024-08-26 17:13:45 +02:00 Unverified
parent 56382986fc
commit be907313da
12 changed files with 210 additions and 211 deletions
+2 -2
View File
@@ -5,10 +5,10 @@ from dictionaries import okru
def okru_get_url(id):
async def okru_get_url(id,client):
embed_link = okru[id]
print(embed_link)
response = requests.get(embed_link)
response = await client.get(embed_link, follow_redirects=True)
soup = BeautifulSoup(response.text, 'lxml')
div = soup.find('div', {'data-module': 'OKVideo'})
data_options = div.get('data-options')