[Python] Check IP address used for a request Python/Scrapy + ProxyMesh

Discussão em 'Python' iniciado por Stack, Fevereiro 7, 2025.

  1. Stack

    Stack Membro Participativo

    I started to use ProxyMesh with Scrapy. ProxyMesh is supposed to provide a pool of IP addresses on one port. The sample code code below is being repeated in a loop, middleware is enabled and overall this works fine. Can I track (and if so - how?) which IP address is being used for each specific request?

    request = scrapy.Request(producturl, self.parse_product_info)
    request.meta['proxy'] = 'http://uk.proxymesh.com:xxx'
    yield request


    I found similar posts on SOF, but not addressing this specific question.

    Continue reading...

Compartilhe esta Página