A package that converts headers and cookies
Project description
Web converter
This is a simple package that converts headers and cookies You can pass a string containing headers and cookies to it, and it will return you a dictionary understandable for the requests module.
Usage for headers:
>>> from web_converter import convert
>>> string = 'Referer: https://github.com/'
>>> example = convert(string)
>>> print(example)
{'Referer': 'https://github.com/'}
>>> print(type(example))
<class 'dict'>
Usage for cookies:
>>> from web_converter import convert_cookies
>>> cookies = 'session_id=aBrwmYi5G8CSST011Dkb'
>>> example_cookies = convert_cookies(string)
>>> print(example_cookies)
{'session_id': 'aBrwmYi5G8CSST011Dkb'}
>>> print(type(example_cookies))
<class 'dict'>
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
web_converter-0.1.0.tar.gz
(2.5 kB
view hashes)
Built Distribution
Close
Hashes for web_converter-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4f3237a2b5dfcba0f8397a88df020535fc84225af714a3e549269381c57b2fe7 |
|
MD5 | 9d0314c33dfacaa1439363ebca533fb8 |
|
BLAKE2b-256 | 90333d0d4bac21dd5f11534fb858c5d34e9cab4368277bf5680b50344e4b5c9a |