Skip to content

Parameter to specify encoding error response#178

Open
ege-del wants to merge 2 commits intos0md3v:masterfrom
ege-del:master
Open

Parameter to specify encoding error response#178
ege-del wants to merge 2 commits intos0md3v:masterfrom
ege-del:master

Conversation

@ege-del
Copy link

@ege-del ege-del commented Mar 7, 2021

added parameter to utilize 'encode' method's 'errors' parameter e.g.;
string.encode(encoding='utf-8', errors='ignore')

usage
python photon.py --encoding-error "ignore" -u ...

Tested on

os: Ubuntu 20.04.2 LTS
python: 3.7

trail += '?' + url.split('?')[1]
with open(path + name + trail, 'w+') as out_file:
out_file.write(response.encode('utf-8'))
out_file.write(response.encode('utf-8',errors=encoding_error_response))

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ege-del, can we use errors = ignore here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants