real-headers


Namereal-headers JSON
Version 0.1.2 PyPI version JSON
download
home_pagehttps://github.com/iNadeemDev/real_headers
SummaryReal Headers is a Python library that generates random HTTP headers and browser fingerprints that mimic real browsers.
upload_time2024-10-29 14:03:16
maintainerNone
docs_urlNone
authorMuhammad Nadeem
requires_pythonNone
licenseNone
keywords headers user-agent browser fingerprint fake headers real headers request headers http headers random headers realheaders
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Real Headers


**Real Headers** is a Python library that generates random HTTP headers and browser fingerprints that mimic real browsers. It is designed to be used in web scraping and automation tasks, where realistic headers are essential for avoiding detection and ensuring proper functionality.

## Installation

You can install the `real_headers` library using pip:

```bash
pip install real_headers
```

## Features

- Generates random HTTP headers based on popular web browsers like Chrome, Firefox, Opera, Edge, Chromium, and Safari.<br>
- Provides realistic random user agents.

## Usage

### Generating Real Headers

To generate a random set of HTTP headers that mimic real browsers:

```python
from real_headers import real_headers

headers = real_headers()
print(headers)
```

### Example Output:
```
{
    'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8',
    'Accept-Encoding': 'gzip, deflate, sdch',
    'Accept-Language': 'en-US,en;q=0.8',
    'Cache-Control': 'max-age=0',
    'Connection': 'keep-alive',
    'Upgrade-Insecure-Requests': '1',
    'User-Agent': 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/58.0.3029.110 Chrome/58.0.3029.110 Safari/537.36'
}
```

### Generating a Random User Agent

To get a real and random user agent string:

```python
from real_headers import real_user_agent

user_agent = real_user_agent()
print(user_agent)
```

### Example Output:
```
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/129.0.0.0 Safari/537.36
```

## Command Line Interface (CLI)

After installing, you can also use the package directly from the command line.

### To Display Complete Headers:

```bash
real-headers

# Output
{
    "Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8",
    "Accept-Language": "en-US,en;q=0.5",
    "Accept-Encoding": "gzip, deflate",
    "Connection": "keep-alive",
    "Upgrade-Insecure-Requests": "1",
    "Cache-Control": "max-age=0",
    "User-Agent": "Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.9.2.2) Gecko/20100316 Firefox/3.6.2 ( .NET CLR 3.0.04506.648)"
}
```

### To Display Random User Agent:

```bash
real-user-agent

# Output
Mozilla/5.0 (X11; U; Linux i686; es-AR; rv:1.8.1.6) Gecko/20070803 Firefox/2.0.0.6 (Swiftfox)
```

## License

This project is licensed under the MIT License - see the [LICENSE](https://github.com/iNadeemDev/real_headers/blob/main/LICENSE) file for details.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/iNadeemDev/real_headers",
    "name": "real-headers",
    "maintainer": null,
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": null,
    "keywords": "headers, user-agent, browser, fingerprint, fake headers, real headers, request headers, http headers, random headers, realheaders",
    "author": "Muhammad Nadeem",
    "author_email": "nadeemdsb5@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/0e/e5/cd255fb3bb74256e0e2bceb49e6a025a73c6bdaa4280afa266792cc6414e/real_headers-0.1.2.tar.gz",
    "platform": null,
    "description": "# Real Headers\n\n\n**Real Headers** is a Python library that generates random HTTP headers and browser fingerprints that mimic real browsers. It is designed to be used in web scraping and automation tasks, where realistic headers are essential for avoiding detection and ensuring proper functionality.\n\n## Installation\n\nYou can install the `real_headers` library using pip:\n\n```bash\npip install real_headers\n```\n\n## Features\n\n- Generates random HTTP headers based on popular web browsers like Chrome, Firefox, Opera, Edge, Chromium, and Safari.<br>\n- Provides realistic random user agents.\n\n## Usage\n\n### Generating Real Headers\n\nTo generate a random set of HTTP headers that mimic real browsers:\n\n```python\nfrom real_headers import real_headers\n\nheaders = real_headers()\nprint(headers)\n```\n\n### Example Output:\n```\n{\n    'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8',\n    'Accept-Encoding': 'gzip, deflate, sdch',\n    'Accept-Language': 'en-US,en;q=0.8',\n    'Cache-Control': 'max-age=0',\n    'Connection': 'keep-alive',\n    'Upgrade-Insecure-Requests': '1',\n    'User-Agent': 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/58.0.3029.110 Chrome/58.0.3029.110 Safari/537.36'\n}\n```\n\n### Generating a Random User Agent\n\nTo get a real and random user agent string:\n\n```python\nfrom real_headers import real_user_agent\n\nuser_agent = real_user_agent()\nprint(user_agent)\n```\n\n### Example Output:\n```\nMozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/129.0.0.0 Safari/537.36\n```\n\n## Command Line Interface (CLI)\n\nAfter installing, you can also use the package directly from the command line.\n\n### To Display Complete Headers:\n\n```bash\nreal-headers\n\n# Output\n{\n    \"Accept\": \"text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\",\n    \"Accept-Language\": \"en-US,en;q=0.5\",\n    \"Accept-Encoding\": \"gzip, deflate\",\n    \"Connection\": \"keep-alive\",\n    \"Upgrade-Insecure-Requests\": \"1\",\n    \"Cache-Control\": \"max-age=0\",\n    \"User-Agent\": \"Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.9.2.2) Gecko/20100316 Firefox/3.6.2 ( .NET CLR 3.0.04506.648)\"\n}\n```\n\n### To Display Random User Agent:\n\n```bash\nreal-user-agent\n\n# Output\nMozilla/5.0 (X11; U; Linux i686; es-AR; rv:1.8.1.6) Gecko/20070803 Firefox/2.0.0.6 (Swiftfox)\n```\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](https://github.com/iNadeemDev/real_headers/blob/main/LICENSE) file for details.\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "Real Headers is a Python library that generates random HTTP headers and browser fingerprints that mimic real browsers.",
    "version": "0.1.2",
    "project_urls": {
        "Homepage": "https://github.com/iNadeemDev/real_headers",
        "Source": "https://github.com/iNadeemDev/real_headers"
    },
    "split_keywords": [
        "headers",
        " user-agent",
        " browser",
        " fingerprint",
        " fake headers",
        " real headers",
        " request headers",
        " http headers",
        " random headers",
        " realheaders"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "61ecdf6ff8027c7c786e36c741abe8fba10ad59220063c49d83c22c66dc83889",
                "md5": "9fdd36955927cce35a0d2f2eb6829f74",
                "sha256": "bfe8b93b97fc7b7234980b9257ec1f43126cfda940ab7817b6dec67ce904fddf"
            },
            "downloads": -1,
            "filename": "real_headers-0.1.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "9fdd36955927cce35a0d2f2eb6829f74",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 47775,
            "upload_time": "2024-10-29T14:03:15",
            "upload_time_iso_8601": "2024-10-29T14:03:15.279835Z",
            "url": "https://files.pythonhosted.org/packages/61/ec/df6ff8027c7c786e36c741abe8fba10ad59220063c49d83c22c66dc83889/real_headers-0.1.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "0ee5cd255fb3bb74256e0e2bceb49e6a025a73c6bdaa4280afa266792cc6414e",
                "md5": "a66957290037e42101ebc2103710932f",
                "sha256": "d5a345525d66f0426859018a1a9802cdfd052cdc28b8a49275ec013d47e60abb"
            },
            "downloads": -1,
            "filename": "real_headers-0.1.2.tar.gz",
            "has_sig": false,
            "md5_digest": "a66957290037e42101ebc2103710932f",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 46868,
            "upload_time": "2024-10-29T14:03:16",
            "upload_time_iso_8601": "2024-10-29T14:03:16.772039Z",
            "url": "https://files.pythonhosted.org/packages/0e/e5/cd255fb3bb74256e0e2bceb49e6a025a73c6bdaa4280afa266792cc6414e/real_headers-0.1.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-10-29 14:03:16",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "iNadeemDev",
    "github_project": "real_headers",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "real-headers"
}
        
Elapsed time: 0.51850s