{"id":16649364,"url":"https://github.com/jin10086/copyheaders","last_synced_at":"2025-09-26T12:31:01.105Z","repository":{"id":62564786,"uuid":"105555744","full_name":"jin10086/copyheaders","owner":"jin10086","description":"方便的从浏览器复制浏览器头","archived":false,"fork":false,"pushed_at":"2020-05-31T05:35:40.000Z","size":5,"stargazers_count":44,"open_issues_count":2,"forks_count":9,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-11T19:00:46.771Z","etag":null,"topics":["crawler","python","tools"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jin10086.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-10-02T16:10:46.000Z","updated_at":"2024-05-08T08:07:04.000Z","dependencies_parsed_at":"2022-11-03T16:00:45.983Z","dependency_job_id":null,"html_url":"https://github.com/jin10086/copyheaders","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jin10086%2Fcopyheaders","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jin10086%2Fcopyheaders/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jin10086%2Fcopyheaders/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jin10086%2Fcopyheaders/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jin10086","download_url":"https://codeload.github.com/jin10086/copyheaders/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":234309715,"owners_count":18811946,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["crawler","python","tools"],"created_at":"2024-10-12T09:09:00.094Z","updated_at":"2025-09-26T12:30:55.787Z","avatar_url":"https://github.com/jin10086.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"copyheaders\n===========\n\n方便的从浏览器复制headers\n\n本项目是从https://github.com/scrapy/w3lib 修改过来的\n\n为什么要修改请看https://github.com/scrapy/w3lib/issues/90\n\n\nSample Code\n-----------\n\n```python\nfrom copyheaders import headers_raw_to_dict\nimport requests\n\nheaders_raw = b\"\"\"Accept:text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8\nAccept-Encoding:gzip, deflate, br\nAccept-Language:zh-CN,zh;q=0.8,zh-TW;q=0.6\nCache-Control:max-age=0\nConnection:keep-alive\nCookie:_gauges_unique_year=1; _gauges_unique=1; _gauges_unique_hour=1; _gauges_unique_day=1; _gauges_unique_month=1\nHost:httpbin.org\nUpgrade-Insecure-Requests:1\nUser-Agent:Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.100 Safari/537.36\"\"\"\n\nheaders = headers_raw_to_dict(headers_raw)\n# 然后就可以在requests中直接用了\nz = requests.get('https://httpbin.org/',headers=headers)\n```\nInstallation\n------------\n* `pip install copyheaders`\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjin10086%2Fcopyheaders","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjin10086%2Fcopyheaders","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjin10086%2Fcopyheaders/lists"}