-
-
Save anonymous/6c4a833c2722a5c1657e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
>>> table = {} | |
>>> for v in html.xpath('//td[@class="bottlinglabel"]/following-sibling::td'): | |
... table[v.getprevious().text] = v.text | |
... | |
>>> table | |
{'Johannes van den Heuvel': '67 ', 'Bottling Name': 'Non-Chillfiltered', 'Bottler': ' Official Bottling', 'Brand Name': 'Arran', 'Alcohol By Volume': '46%', 'Issued': None, 'Davin de Kergommeaux': '71 ', 'Distillery': 'Arran', 'Ho-cheng Yao': '63 ', 'Lawrence Graham': '72 ', 'Bert Bruyneel': '76 ', 'Luc Timmermans': '66 ', 'Serge Valentin': '65 ', 'Krishna Nukala': '80 ', None: 'No tasting notes listed yet for this bottling.', 'Average Score': '71', 'Olivier Humbrecht': '82 ', 'Type': 'Scotch Single Malts (Disclosed Distilleries)'} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment