Home / Integrations

Proxies in Scrapy

Replace LOGIN and PASSWORD with the values from your dashboard.

Example

import scrapy

class PageSpider(scrapy.Spider):
    name = "page"

    def start_requests(self):
        yield scrapy.Request("https://example.com/", meta={"proxy": "http://LOGIN:PASSWORD@gate.lyraproxy.com:7000"})

    def parse(self, response):
        yield {"title": response.css("title::text").get()}

The proxy is set in the meta of each request and picked up by the built-in HttpProxyMiddleware. For rotation leave the session out of the login.

Other integrations

Proxies are ready right after payment

Pick a plan and volume in the dashboard. You can change the country, city and session type after purchase as often as you like.

Create an account