Skip to content

Instantly share code, notes, and snippets.

Created December 6, 2014 03:11
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 anonymous/d131268c9b24f9f1493d to your computer and use it in GitHub Desktop.
Save anonymous/d131268c9b24f9f1493d to your computer and use it in GitHub Desktop.
>>> table = html.find('.//table')
>>> i = iter(td.text for td in table.findall('.//td')[1:])
>>> data = dict(zip(i, i))
>>> data
{'Bottling Name': 'Non-Chillfiltered', 'Bottler': ' Official Bottling', 'Brand Name': 'Arran', 'Alcohol By Volume': '46%', 'Issued': None, 'Distillery': 'Arran', 'Average Score': '71', 'Type': 'Scotch Single Malts (Disclosed Distilleries)'}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment