Skip to content
This repository has been archived by the owner on Jul 10, 2023. It is now read-only.

Commit

Permalink
Merge pull request #101 from zdict/issue-100
Browse files Browse the repository at this point in the history
[#100] prevent ``KeyError`` being caused crash
  • Loading branch information
pi314 committed Aug 31, 2016
2 parents e132d31 + 9473b4f commit 92eae41
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion zdict/dictionaries/yahoo.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ def query(self, word: str):

for example in (
tag for tag in item.find_all('span')
if 'line-height: 17px;' not in tag['style']
if 'line-height: 17px;' not in tag.get('style', {})
):
sentence = ''

Expand Down

0 comments on commit 92eae41

Please sign in to comment.