Linked Questions
10 questions linked to/from Python - make a POST request using Python 3 urllib
128
votes
9
answers
379k
views
How do I send a POST request as a JSON?
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 ...
3
votes
1
answer
10k
views
How do I add a parameter to a POST request's body with urllib?
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
How to fill a form with post request and get response
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="...
3
votes
3
answers
7k
views
How do we use POST method in Python using urllib.request?
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
Making a POST request using urllib with multiple headers gives 400 Bad Request error
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 ...
1
vote
1
answer
2k
views
python - POST request doesn't work
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
Python; Submitting Web Form, How to use a search bar?
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
How do you update DynamoDB from Jupyter Notebook via API Gateway?
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
Replicating wget command with Python's urllib?
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
dump items into a json file from a website using url lib
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 ...