Skip to content

Instantly share code, notes, and snippets.

@jseabold
Last active October 13, 2015 07:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jseabold/4158367 to your computer and use it in GitHub Desktop.
Save jseabold/4158367 to your computer and use it in GitHub Desktop.
ungooogle
import urllib
import re
def ungoogle(url, type="pdf"):
try:
return urllib.unquote(re.search("(?<=url=).+"+type, url).group())
except:
return urllib.parse.unquote(re.search("(?<=url=).+"type, url).group())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment