-
-
Save rupansh/2dfa9fcae01b1015aa1feb38cbc3ba10 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
url = input("enter post url ") | |
res = requests.get(url) | |
img = filter(lambda x: "og:image" in x, res.text.split("\n")) | |
print(next(img).split()[2].replace("content=", "")) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment