Created
February 21, 2020 11:25
-
-
Save MayankFawkes/ce6b99f547186ab73ffe70b3277094a8 to your computer and use it in GitHub Desktop.
This file contains hidden or 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,re | |
| pinid="116671446577537458" | |
| html=requests.get("https://www.pinterest.com/pin/{}/".format(pinid)).text | |
| ok=str(re.findall('<script id="initial-state" type="application/json">(.*?)</script>',html)[0]) | |
| data=["https://i.pinimg.com/originals/"+n for n in re.findall('"url":"https://i.pinimg.com/originals/(.*?)"',ok)][0] | |
| print(data) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment