Skip to content

Commit

Permalink
Merge pull request #225 from yuji38kwmt/add-encoding-kwargs
Browse files Browse the repository at this point in the history
Add encoding kwargs
  • Loading branch information
gawel committed Oct 4, 2021
2 parents 9282d83 + 4d372e7 commit 0a5f285
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pyquery/pyquery.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,8 @@ def __init__(self, *args, **kwargs):
if kwargs:
# specific case to get the dom
if 'filename' in kwargs:
html = open(kwargs['filename'])
html = open(kwargs['filename'],
encoding=kwargs.get('encoding'))
elif 'url' in kwargs:
url = kwargs.pop('url')
if 'opener' in kwargs:
Expand Down

0 comments on commit 0a5f285

Please sign in to comment.