from bs4 import BeautifulSoup
import requests
import os
import time
url = input("Enter valid url: ")
html = requests.get(url)
if html:
print("The url is Ok")
soup = BeautifulSoup(html.text,"html.parser")
result = ""
for meta in soup.find_all("meta"):
if meta.get("property") == "og:image":
result = meta.get("content")
if meta.get("property") == "og:video":
result = meta.get("content")
if result:
print("OK, open chrome with link")
print("Use right mouse and save as..")
time.sleep(1)
os.system("start chrome {}".format(result))