Hack Forums
[Python] WebRequests? - Printable Version

+- Hack Forums (https://hackforums.net)
+-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444)
+--- Forum: Coding (https://hackforums.net/forumdisplay.php?fid=151)
+---- Forum: Software Development (https://hackforums.net/forumdisplay.php?fid=118)
+---- Thread: [Python] WebRequests? (/showthread.php?tid=4986102)



WebRequests? - SyyK - Sep 13, 2015

Hey,


I'm pretty new to python.

I'd like to know whats the best & easiest way to make a Webrequest? (POST)


Thanks!


* - SIM-1866423 - Sep 13, 2015

PHP Code

<?php 
Google 
: best & easiest way to make a Web Request python
39.400.000 in 0.32 sec 

First link

PHP Code

<?php 
import urllib2
import httplib
import requests 

🤮

ps : try all of them and pick one.


* - Xenolith - Sep 13, 2015

I would use the requests library :) Look at this link to learn how to use it, I can't post links so you will need to replace "DOT" with . :c
python-requests DOT org/en/latest/user/quickstart/#more-complicated-post-requests
It should be quite straightforward, but if there is anything you need help with, just pm me and I'll do the best to help ^w^


* - sirius_black - Sep 14, 2015

Yes, requests is much more advanced. It deals with redirections, cookies, multipart encoding + it's easy.