{"id":13412401,"url":"https://github.com/aivarsk/scrapy-proxies","last_synced_at":"2025-12-25T17:06:11.058Z","repository":{"id":6499507,"uuid":"7740006","full_name":"aivarsk/scrapy-proxies","owner":"aivarsk","description":"Random proxy middleware for Scrapy ","archived":false,"fork":false,"pushed_at":"2019-10-01T06:30:18.000Z","size":19,"stargazers_count":1653,"open_issues_count":38,"forks_count":409,"subscribers_count":59,"default_branch":"master","last_synced_at":"2024-09-30T21:49:01.789Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","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/aivarsk.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-01-21T20:42:14.000Z","updated_at":"2024-09-28T14:47:13.000Z","dependencies_parsed_at":"2022-09-07T16:41:00.831Z","dependency_job_id":null,"html_url":"https://github.com/aivarsk/scrapy-proxies","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/aivarsk%2Fscrapy-proxies","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aivarsk%2Fscrapy-proxies/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aivarsk%2Fscrapy-proxies/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aivarsk%2Fscrapy-proxies/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aivarsk","download_url":"https://codeload.github.com/aivarsk/scrapy-proxies/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243625119,"owners_count":20321235,"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":[],"created_at":"2024-07-30T20:01:24.264Z","updated_at":"2025-12-25T17:06:10.991Z","avatar_url":"https://github.com/aivarsk.png","language":"Python","funding_links":[],"categories":["Python","Apps","Scrapy Middleware"],"sub_categories":["Avoid Ban"],"readme":"Random proxy middleware for Scrapy (http://scrapy.org/)\n=======================================================\n\nProcesses Scrapy requests using a random proxy from list to avoid IP ban and\nimprove crawling speed.\n\nGet your proxy list from sites like http://www.hidemyass.com/ (copy-paste into text file\nand reformat to http://host:port format)\n\nInstall\n--------\n\nThe quick way:\n\n    pip install scrapy_proxies\n\nOr checkout the source and run\n\n    python setup.py install\n\n\nsettings.py\n-----------\n\n    # Retry many times since proxies often fail\n    RETRY_TIMES = 10\n    # Retry on most error codes since proxies fail for different reasons\n    RETRY_HTTP_CODES = [500, 503, 504, 400, 403, 404, 408]\n\n    DOWNLOADER_MIDDLEWARES = {\n        'scrapy.downloadermiddlewares.retry.RetryMiddleware': 90,\n        'scrapy_proxies.RandomProxy': 100,\n        'scrapy.downloadermiddlewares.httpproxy.HttpProxyMiddleware': 110,\n    }\n\n    # Proxy list containing entries like\n    # http://host1:port\n    # http://username:password@host2:port\n    # http://host3:port\n    # ...\n    PROXY_LIST = '/path/to/proxy/list.txt'\n    \n    # Proxy mode\n    # 0 = Every requests have different proxy\n    # 1 = Take only one proxy from the list and assign it to every requests\n    # 2 = Put a custom proxy to use in the settings\n    PROXY_MODE = 0\n    \n    # If proxy mode is 2 uncomment this sentence :\n    #CUSTOM_PROXY = \"http://host1:port\"\n\n\nFor older versions of Scrapy (before 1.0.0) you have to use\nscrapy.contrib.downloadermiddleware.retry.RetryMiddleware and\nscrapy.contrib.downloadermiddleware.httpproxy.HttpProxyMiddleware\nmiddlewares instead.\n\n\nYour spider\n-----------\n\nIn each callback ensure that proxy /really/ returned your target page by\nchecking for site logo or some other significant element.\nIf not - retry request with dont_filter=True\n\n    if not hxs.select('//get/site/logo'):\n        yield Request(url=response.url, dont_filter=True)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faivarsk%2Fscrapy-proxies","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faivarsk%2Fscrapy-proxies","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faivarsk%2Fscrapy-proxies/lists"}