0

I'm looking to switch existing PHP code over to Python using the Requests library. The PHP code sends thousands of GET requests to an API to get needed data. The API limits GET requests to one every 6 seconds per IP. We have numerous IP addresses in order to pull faster. The faster the better in this case.

My question is is there a way to send the GET request from different IP addresses using the Requests library? I'm also open to using different libraries in Python or different methods to replace the IP addresses.

The current code makes use of curl_multi_exec with the CURLOPT_INTERFACE setting.

As far as code goes, I don't necessarily need code examples. I'm looking for more of a direction or option that will allow such features in Python. I would prefer not post code, but if its necessary, let me know.

Thanks!

Michael Stramel
  • 1,337
  • 1
  • 16
  • 18

1 Answers1

1

I don't believe Requests supports setting the outbound interface.

There is a Python cURL library, though.

Amber
  • 507,862
  • 82
  • 626
  • 550