Skip to main content

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


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)

Uploaded Source

Built Distribution

web_converter-0.1.0-py3-none-any.whl (3.4 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page