All Questions
Tagged with python-3.6 python-requests
63 questions
0
votes
0
answers
249
views
crontab error "ImportError: No module named request" python runs OK in terminal - fails in crontab
I am having difficulty in a running python script that calls module "requests" in crontab. This was fine a few days ago and then I had to change my authentication for Google (to send emails),...
-1
votes
1
answer
473
views
Download a file using twill and python3.6
As the title suggests, i would like to download a PDF document from a website written in jspx.
I've got everything working up until when i need to download a file.
This is my code
#!/usr/bin/python3
...
1
vote
1
answer
333
views
django rest framework running on apache2 not returning full response to client
I'm running an api on apache/2.4.29 built using django rest framework 3.10.3 on top of django 2.2.5 running on wsgi, whenever I try to return a json object for a POST request from a client, the POST ...
3
votes
2
answers
2k
views
How to modify a yarl.URL object?
I am trying to update the path of a relative url using python requests. My request.rel_url object (datatype = <class 'yarl.URL'>) has the following value:
/date/v6/cal?week=three&day=mon
I ...
1
vote
1
answer
40
views
How to Merge Python List containing dictionaries into one final list
Here are my Lists:
prices = [
{'price': '19,294'}, {'price': '20,365'}, {'price': '21,437'},
{'price': '22,628'}, {'price': '25,963'}, {'price': '26,439'},
{'price': '28,821'}, {'price': '...
0
votes
1
answer
786
views
Python3 : Records not getting pushed to Splunk
I have created a custom class, which push my logs to splunk, but somehow it is not working. Here is the class.
class Splunk(logging.StreamHandler):
def __init__(self, url, token):
super()....
0
votes
2
answers
666
views
Using 'requests' library in Python Django 3.0.6
I am trying to get some data using Django forms, the data is actually an URL, like this:
def sample(request):
if request.method == 'POST':
form = sampleForm(request.POST)
if form....
2
votes
1
answer
213
views
403 Error returned when I call an endpoint from python - what am I doing wrong?
I have signed up for and been provided all of the details for a store locator API Key against my User ID from Walgreens.
When I run the code below in python (with the relevant private cred's) I get ...
0
votes
1
answer
97
views
pass a list into requests.get()
This gets one URL and prints it in XML format.
import requests
from bs4 import BeautifulSoup
url = r'''https://secure.shippingapis.com/ShippingAPI.dll?API=Verify&XML=
<...
1
vote
0
answers
1k
views
How to use Python requests to connect to a server through proxy when both requires different client certificate
I want to connect to a https server using python requests library through a proxy. The code roughly looks like
response = requests.get(SERVER_ENDPOINT, proxies=PROXIES, cert=??)
My problem is, both ...
0
votes
1
answer
325
views
How to create Dashboard using Python or R
In my company, I have got task to create dash board using python whose complete look and feel should be like qlicksense. I am fresher in data science field I don't know how to do this. I did lots of R ...
0
votes
1
answer
134
views
log in with python requests failed
I am trying to use requests to mimic a login for https://www.recreation.gov/. To do that, I first find out the request details by using chrome inspect, which is the following:
Request URL: https://...
0
votes
1
answer
518
views
Iterate and extract tables from web saving as excel file in Python
I want to iterate and extract table from the link here, then save as excel file.
How can I do that? Thank you.
My code so far:
import pandas as pd
import requests
from bs4 import BeautifulSoup
from ...
0
votes
0
answers
109
views
How to do fire and forget post request in python
I am sending a post request in opencv script,the script is waiting for response and delays the execution of remaining block of code.
def main():
do something
while true:
opencv block
r = ...
0
votes
2
answers
170
views
python requests.post error when upgrade from 2.7 to 3.6
I have this code that is used to send a post to aws api gateway
payload = {"thing-name": thing_name, "thing-name-sig": sig}
r = requests.post(api_gw, data=payload)
the api gateway returns:
Method ...