louisabraham / har2requests

Generate Python Requests code from your browser activity 🤖
MIT License
106 stars 15 forks source link

Tor har file bug requires k.encode("utf-8") #16

Closed orionnelson closed 2 years ago

orionnelson commented 2 years ago

Came across the error headers = {k: v for k, v in headers.items() if is_legal_header_name(k)} TypeError: cannot use a bytes pattern on a string-like object

This pull request fixes this issue

louisabraham commented 2 years ago

I think the bug is not just for Tor, I introduced this bug myself. I'm fixing it using another method.

louisabraham commented 2 years ago

Actually I like your solution! Thank you a lot for your contribution!