Hacker News new | past | comments | ask | show | jobs | submit login

Please also add support for different so we can write

—-libcurl example.py




Libcurl is a c/c++ library... Just use Requests


Try https://curlconverter.com/ - "Convert curl commands to Python, JavaScript and more"


You can probably get pretty far with the generated C code, then look up the same curl options in the Python bindings:

https://github.com/pycurl/pycurl


Tools already convert a curl command line to a Python requests script.

[1] https://github.com/spulec/uncurl


Its quite effective to use ChatGPT to convert C code to Python ..


... or "curl calls to python webscraping". Although having to look for the right version of libraries with different number names and therefore different feature sets was tedious to do manually, AI might just guess fast and sometimes even right as to which import to use.




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: