Skip to content

Instantly share code, notes, and snippets.

@SurendraTamang
Created July 18, 2020 04:13
Show Gist options
  • Save SurendraTamang/1737865d9443391a65a515d1456a758f to your computer and use it in GitHub Desktop.
Save SurendraTamang/1737865d9443391a65a515d1456a758f to your computer and use it in GitHub Desktop.
Extracting the original URL from the referrer URL
"""
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