Skip to content

Instantly share code, notes, and snippets.

@fpg1503
Created June 16, 2017 17:25
Show Gist options
  • Save fpg1503/d8ee1265e58fcd5ba71814a597c24383 to your computer and use it in GitHub Desktop.
Save fpg1503/d8ee1265e58fcd5ba71814a597c24383 to your computer and use it in GitHub Desktop.
import requests
from bs4 import BeautifulSoup
all_symbols = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890"
url = "http://protext.herokuapp.com/?text=" + all_symbols
request = requests.get(url)
parsed_html = BeautifulSoup(request.text, "html.parser")
all_keys = list(all_symbols)
all_values = list(parsed_html.find('h1').text)
dictionary = dict(zip(all_keys, all_values))
print(dictionary)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment