Linked Questions

128 votes
9 answers
379k views

data = { 'ids': [12, 3, 4, 5, 6 , ...] } urllib2.urlopen("http://abc.example/api/posts/create",urllib.urlencode(data)) I want to send a POST request, but one of the fields ...
TIMEX's user avatar
  • 275k
3 votes
1 answer
10k views

I need to send a POST request with this format using urllib: POST /oauth/access_token HTTP/1.1 User-Agent: themattharris' HTTP Client Host: api.twitter.com Accept: */* Authorization: OAuth ...
1 vote
1 answer
11k views

I have a form like following: url = "http:/foo.com" <table> <form action="showtree.jsp" method="post" id="form" name="form"> <input type="hidden" id="sortAction" name="...
frazman's user avatar
  • 33.5k
3 votes
3 answers
7k views

I have to make use of POST method using urllib.request in Python and have written the following code for POST method. values = {"abcd":"efgh"} headers = {"Content-Type": "application/json", "...
4 votes
1 answer
4k views

I have used requests library and I know how to work with it, but I need to work with standard library only, so I would appreciate if you don't encourage me to use requests instead. I made a flask ...
jar's user avatar
  • 2,938
1 vote
1 answer
2k views

I copied the POST data using chrome developer tools, and put them into a text file. from pprint import pprint import requests d= {} with open('form1.txt') as g: stuff = g.readlines() for ...
1 vote
0 answers
318 views

I have been trying to search a website and collect urls to the articles it yields, but I have run into problems I don't understand. I have read the following on web forms, and I believe that my ...
0 votes
1 answer
304 views

I'm building a personal webscraper and I'm still in dev phase, but I want to start saving data. The problem is, I cannot PUT or POST from the notebook level, which also means I cannot iterate through ...
-1 votes
2 answers
263 views

I am trying to use a web API in my Python program, but I can't figure out how. Here is an example call using the command line in Bash/Unix: wget --post-file="example.txt" "http://...
0 votes
1 answer
116 views

I am trying to make a chat bot where the intents.json(bot.json for my case) is loaded on a website I can access it using the "urlopen(url)" function with urllib but I can't dump anything ...