Requests is a full-featured Python HTTP library with an easy-to-use, logical API.

learn more… | top users | synonyms

0
votes
0answers
6 views

What is best way to prevent python requests module blocking indefinitely after computer come back from suspend mode?

Try to do this: import requests response = requests.get(some_url) In some_url variable, assign some url to download a file, for example. While downloading, force your computer to suspend. Finally, ...
2
votes
1answer
22 views

Flask / Werkzeug request objects form parameter

I have an Flask app that serves an API to a Django consumer. I use the requests library in my consumer to hit the API. My problem is this: When I test my API I get POST data in request.form, and when ...
1
vote
1answer
28 views

How to prevent webpage from crashing BeautifulSoup?

On Python 3.2.3 running on Kubuntu Linux 12.10 with Requests 0.12.1 and BeautifulSoup 4.1.0, I am having some web pages break on parsing: try: response = ...
0
votes
1answer
20 views

s = requests.Session() How do I get the cookie value for the session within my script?

I tried: login_data_2['_sn'] = s.__attrs__[1] but this didn't work. pydoc has the following: __attrs__ = ['headers', 'cookies', 'auth', 'timeout', 'proxies', 'hook..
0
votes
2answers
30 views

Python Request Post issue

I am working with an API that has no documentation and I have hit a stumbling block. I have a function: def add_to_publicaster(self): # function that is called in the background whenever a user ...
0
votes
1answer
20 views

Requests library crashing on Python 2 and Python 3 with

I am trying to parse arbitrary webpages with the requests and BeautifulSoup libraries with this code: try: response = requests.get(url) except Exception as error: return False if ...
1
vote
1answer
42 views

Retrieving HTML form submission in Python when there is a loading page

I'm trying to automate a search on the conserved domain database (CDD) - http://www.ncbi.nlm.nih.gov/Structure/cdd/wrpsb.cgi with python where I submit content to a HTML form. The problem is that once ...
0
votes
1answer
17 views

How to send DELETE request in Pycurl ?

I have no idea how to write the following curl command in python using pycurl or requests. curl -X DELETE -d '{"key": "value"}' http://url/json
0
votes
2answers
29 views

SSLError in Requests when packaging as OS X .app

I'm developing an application for OS X. The application involves communicating with a server through python-requests, using a secure connection. I am able to run the python file I intend to package, ...
1
vote
1answer
19 views

Return last URL in sequence of redirects

I sometimes need to parse with Beautiful Soup and Requests URLs that are provided as such: http://bit.ly/sdflksdfwefwe http://stup.id/sdfslkjsfsd http://0.r.msn.com/sdflksdflsdj Of ...
0
votes
1answer
32 views

POST single file in Python

Is there an easy way to upload single file using Python? I know about requests, but it POST a dict of files containing a single file, so we have a little problem receiving that one file on the other ...
0
votes
1answer
31 views

Bad Request (400) error while trying to access REST API using requests in python

This error is so common that I found several hits on this error. However, couldn't find a solution to my problem. I am trying to consume a REST API (not one of the publicly available ones) using ...
0
votes
1answer
19 views

Python script using requests to post files to Django app - Nothing in request.FILES

Using Django 1.5 and Python 2.7.3. Simple example to demonstrate my problem. I can't send files to our Django webapp using Python + requests. I'm using a script that resides on my computer and ...
0
votes
1answer
21 views

urllib2/requests and HTTP relative path

How can I force urllib2/requests modules to use relative paths instead of full/absolute URL?? when I send request using urllib2/requests I see in my proxy that it resolves it to: GET ...
0
votes
2answers
24 views

How to disable cookie handling with the Python requests library?

When I use requests to access an URL cookies are automatically sent back to the server (in the following example the requested URL set some cookie values and then redirect to another URL that display ...

1 2 3 4 5 25
15 30 50 per page