What's the best way to use curl in Python for web requests? or How do I replace curl commands with Py

16 Replies, 858 Views

Honestly, ditch curl python unless you’re glued to it for legacy reasons.

`requests` is dead simple:

```python
import requests
r = requests.get('https://example.com')
print(r.text)
```

No fuss, no weird flags. Pycurl’s only worth it if you’re doing something *wild* with libcurl.

Messages In This Thread



Users browsing this thread: 1 Guest(s)