Proxy Integration with Scrapy Proxy Middleware
Learn how to set up residential proxies with the Scrapy proxy middleware.
55M+ IP pool
Advanced targeting
195+ global locations
24/7 tech support
Easy to integrate
99.99% uptime
What is the Scrapy proxy middleware?
Scrapy is an open-source web crawling framework for Python that extracts data from websites, processes it, and stores it. The proxy middleware enables it to bypass IP-based rate limiting and access geographically restricted content, improving the efficiency and reach of web scraping and crawling tasks.
Asynchronous scraping
Ensure lightning-fast data collection by allowing multiple requests to be processed simultaneously.
Built-in selectors
Streamline data extraction by quickly and accurately gathering the information you need from web pages.
Middleware support
Integrate proxies in just minutes thanks to simple middleware support.
Why residential proxies?
A residential proxy serves as a mediator, allowing users to get an IP address from an authentic desktop or mobile device connected to a local network. Due to its origin, residential proxies are a perfect match for overcoming geo-restrictions, bypassing CAPTCHAs, managing multiple accounts, and conducting web testing with the CapSolver platform.
Smartproxy offers top-notch residential proxies with an extensive IP pool of over 55M IPs across 195+ locations. With an unparalleled responsive rate, clocking in at under 0.6 seconds, a success rate of 99.47%, and an affordable entry point with Pay As You Go, Smartproxy is a great deal for hustlers and fast-growing companies.
Set up Smartproxy proxies with Scrapy
To install the Scrapy proxy middleware, you’ll need to set up a Scrapy project first. Follow the official installation and documentation to create your project. Then, follow the instructions below to set up the middleware:
Getting residential proxies
Log in to your Smartproxy dashboard, find residential proxies by choosing Residential under the Residential Proxies column on the left panel, and select a plan that suits your needs. Then, follow these steps:
- Open the Proxy setup tab.
- Navigate to the Endpoint generator below.
- Configure the parameters. Set your authentication method, location, session type, and protocol.
- Select the number of proxy endpoints you want to generate (default – 10).
- Copy the endpoints by clicking the Copy button.
Installation
Once you’ve obtained the endpoint information, you can install the middleware:
- Open your terminal tool and navigate to the project folder using cd yourprojectname.
- Download the proxy middleware using the following command: curl https://raw.githubusercontent.com/Smartproxy/Scrapy-Middleware/master/smartproxy_auth.py > smartproxy_auth.py or get it from the GitHub repository.
Configuration
- Open the settings.py file in your project folder.
- Edit the file by adding the following properties at the bottom:
DOWNLOADER_MIDDLEWARES = { 'scrapy.downloadermiddlewares.httpproxy.HttpProxyMiddleware': 110, 'yourprojectname.smartproxy_auth.ProxyMiddleware': 100, } SMARTPROXY_USER = 'username'## Smartproxy username SMARTPROXY_PASSWORD = 'password'## Smartproxy password SMARTPROXY_ENDPOINT = 'gate.smartproxy.com'## Endpoint you'd like to use SMARTPROXY_PORT = '7000'## Port of the endpoint you're using
3. Change the yourprojectname in the above to the name of your project folder.
4. Enter the Smartproxy credentials and endpoint information you’ve received from the dashboard.
5. Your web crawlers will now be going through Smartproxy proxies.
Configurations & Integrations
Easy Smartproxy proxy setup with popular applications and free third-party tools. Check out these guides to get started right away.
Reliable proxies at affordable prices
Pick a plan that suits you. Get ahead with unblockable and stable proxies.
What people are saying about us
We're thrilled to have the support of our 50K+ clients and the industry's best
Best online Customer support I've gotten
Customer Support is amazing, agent walked me through an issue I've been dealing since...
We almost forgot we're using proxy
Many regions/configurations available. Convenient API. Very reliable -- issues happen...
Perfect and reliable proxy service
I was in need of a proxy to pass some hard country IP location check and Smartproxy g...
Featured in:
Explore our other proxy line products
What are proxies?
A proxy is an intermediary between your device and the internet, forwarding requests between your device and the internet while masking your IP address.
Residential Proxies
from $2.2/GB
Real, physical device IPs that provide a genuine online identity and enhance your anonymity online. Learn more
ISP Proxies
from $0.35/IP
IPs assigned by Internet Service Providers (ISPs), offering efficient and location-specific online access with minimal latency. Learn more
Mobile Proxies
from $4.5/GB
Mobile device based IPs offering anonymity and real user behavior for mobile-related activities on the internet. Learn more
Datacenter Proxies
from $0.09/IP
Remote computers with unique IPs for tasks requiring scalability, fast response times, and reliable connections. Learn more
Site Unblocker
from $1.6/1K req
A powerful application for all proxying activities offering dynamic rendering, browser fingerprinting, and much more. Learn more
Smartproxy Blog
Build knowledge on residential proxies, or pick up some dope ideas for your next project - our blog is just the perfect place.
Most recent
How to Scrape Amazon ASIN
Imagine you want to collect ASINs (Amazon Standard Identification Numbers) for all the products that appear on Amazon after searching for a specific item. This can be incredibly useful for tasks like market research, competitor analysis, or managing your own product listings. With our Amazon ASIN scraper, you can easily gather these ASINs directly from the search results, making the data collection process quick and efficient. In this guide, we’ll show you how to use our ready-made Amazon scraper to extract ASINs and explain how this information can benefit your business.
Dominykas Niaura
Dec 03, 2024
7 min read
Frequently asked questions
What is Scrapy?
Scrapy is an open-source web crawling framework for Python designed to extract, process, and store data from websites.
What is Scrapy used for?
Scrapy is used to create web crawlers (spiders) that define how to navigate and scrape web pages, making it a powerful tool for web scraping and data mining tasks.
Be aware that any tools mentioned in this article belong to a third party, not Smartproxy. Therefore, Smartproxy will not be responsible for any of the services offered by the third-party. Make sure to thoroughly review the third-party’s policies and practices, or do your due diligence, before using or accessing any of their services.
The Fastest Residential Proxies
Dive into a 55M+ ethically-sourced residential IP pool from 195+ locations worldwide.
14-day money-back option