Skip to content

Instantly share code, notes, and snippets.

@HyShai
Last active August 29, 2015 14:05
Show Gist options
  • Save HyShai/09f4ead7ecb5b2d90338 to your computer and use it in GitHub Desktop.
Save HyShai/09f4ead7ecb5b2d90338 to your computer and use it in GitHub Desktop.
cleanNuzzle.py
from bs4 import BeautifulSoup
import requests
import re
import clipboard
nuzzle = clipboard.get()
url = re.search("^http.+",nuzzle,re.MULTILINE)
url = url.group(0)
resp = requests.get(url)
bs_html = BeautifulSoup(resp.text)
cleanedUrl = bs_html.select('#storyFrame')[0].get('src')
print cleanedUrl
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment