Created
July 18, 2020 04:13
-
-
Save SurendraTamang/1737865d9443391a65a515d1456a758f to your computer and use it in GitHub Desktop.
Extracting the original URL from the referrer URL
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
""" | |
For finding the real url | |
""" | |
import requests | |
def find_original_url(refrence_site,urlhost): | |
return requests.get(url).url.replace(f'?ref={refrence_site}','') | |
if __name__ == "__main__": | |
print("Main is started") | |
url = "https://betalist.com/startups/brevis/visit" | |
print(find_original_url('betalist',url)) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment