Questions tagged [httplib2]

A comprehensive HTTP client library

A comprehensive HTTP client library, httplib2 supports many features left out of other HTTP libraries.

217 questions
-1
votes
2 answers

Get the content of PDF from a URL with Python 3 without download it

Is there a way to read the first page of a PDF document from a URL without saving it locally? I need to read a request for a PDF document on the website. In the following, you will find the code that I tried to execute. The code works well with some…
Olfa
  • 1
-1
votes
2 answers

How can I post more than 64K of data via python's httplib2.Http request method?

If I do this: h = httplib2.Http(timeout=60) resp, content = h.request(uri, method=method, body=body, headers=headers, redirections=redirections, connection_type=connection_type) If body is more…
phil
  • 11
  • 1
-1
votes
1 answer

How can I use httplib2 to upload an image, but not save it to my computer?

How can I use httplib2 to receiving images from the site, but not save it to my computer, but at the same time so that I can use it. My code is: h = httplib2.Http('.cache') response, content = h.request(self.url +…
Ne1zvestnyj
  • 1,391
  • 1
  • 7
  • 25
-1
votes
1 answer

Python requests returns 403

So, I have been developing a small flask app. I have been able to call the activate method from a web form, but i'm trying to post to it using the python requests library and keep getting 403 (there is no authentication being used). But when I post…
Brendan Cook
  • 1
  • 1
  • 1
-1
votes
1 answer

Why am I getting an httplib2.RedirectLimit error?

I have a script that takes a URL and returns the value of the page's tag. After a few hundred or so runs, I always get the same error: File "/home/edmundspenser/Dropbox/projects/myfiles/titlegrab.py", line 202, in get_title status,…</div> <div class="grid ai-start jc-space-between fw-wrap"> <div class="grid gs4 fw-wrap tags "> <a href="../../questions/tagged/python" class="post-tag grid--cell" title="show questions tagged 'python'" rel="tag">python</a> <a href="../../questions/tagged/http" class="post-tag grid--cell" title="show questions tagged 'http'" rel="tag">http</a> <a href="../../questions/tagged/httplib2" class="post-tag grid--cell" title="show questions tagged 'httplib2'" rel="tag">httplib2</a> </div> <div class="started mt0"> <div class="s-user-card s-user-card"> <time class="s-user-card--time" datetime="asked Nov 20 '14 at 18:03">asked Nov 20 '14 at 18:03</time> <a href="../../users/3331268/ian-campbell" class="s-avatar s-avatar__32 s-user-card--avatar"> <img class="s-avatar--image" src="../../users/profiles/3331268.webp" data-jdenticon-width="32" data-jdenticon-height="32" data-jdenticon-value="ian-campbell" /> </a> <div class="s-user-card--info"> <a href="../../users/3331268/ian-campbell" class="s-user-card--link">ian-campbell</a> <ul class="s-user-card--awards"> <li class="s-user-card--rep" title="reputation score">1,605</li> <li class="s-award-bling s-award-bling__gold" title="1 gold badge">1</li> <li class="s-award-bling s-award-bling__silver" title="20 silver badge">20</li> <li class="s-award-bling s-award-bling__bronze" title="42 bronze badge">42</li> </ul> </div> </div> </div> </div> </div> </div> </div> <div class="mln24"> <div class="question-summary" id="question-summary-23608031"> <div class="statscontainer"> <div class="stats"> <div class="vote"> <div class="votes"> <span class="vote-count-post"><strong>-1</strong></span> <div class="viewcount">votes</div> </div> </div> <div class="status "> <strong>1</strong> answer </div> </div> </div> <div class="summary"> <h3><a href="../../questions/23608031/responsenotready-exception-in-httplib2-error" class="question-hyperlink">ResponseNotReady exception in httplib2 error</a></h3> <div class="excerpt">I'm just tryiing to execute a particular api to get the object lists , import httplib2 h = httplib2.Http() print ('=== G E T T I N G ===') resp_headers, content = h.request("http://content.guardianapis.com/search? q=obama&format=json", "GET") print…</div> <div class="grid ai-start jc-space-between fw-wrap"> <div class="grid gs4 fw-wrap tags "> <a href="../../questions/tagged/python" class="post-tag grid--cell" title="show questions tagged 'python'" rel="tag">python</a> <a href="../../questions/tagged/httplib2" class="post-tag grid--cell" title="show questions tagged 'httplib2'" rel="tag">httplib2</a> </div> <div class="started mt0"> <div class="s-user-card s-user-card"> <time class="s-user-card--time" datetime="asked May 12 '14 at 11:39">asked May 12 '14 at 11:39</time> <a href="../../users/1789498/sam" class="s-avatar s-avatar__32 s-user-card--avatar"> <img class="s-avatar--image" src="../../users/profiles/1789498.webp" data-jdenticon-width="32" data-jdenticon-height="32" data-jdenticon-value="Sam" /> </a> <div class="s-user-card--info"> <a href="../../users/1789498/sam" class="s-user-card--link">Sam</a> <ul class="s-user-card--awards"> <li class="s-user-card--rep" title="reputation score">747</li> <li class="s-award-bling s-award-bling__gold" title="1 gold badge">1</li> <li class="s-award-bling s-award-bling__silver" title="8 silver badge">8</li> <li class="s-award-bling s-award-bling__bronze" title="14 bronze badge">14</li> </ul> </div> </div> </div> </div> </div> </div> </div> <div class="mln24"> <div class="question-summary" id="question-summary-26703282"> <div class="statscontainer"> <div class="stats"> <div class="vote"> <div class="votes"> <span class="vote-count-post"><strong>-2</strong></span> <div class="viewcount">votes</div> </div> </div> <div class="status answered-accepted"> <strong>1</strong> answer </div> </div> </div> <div class="summary"> <h3><a href="../../questions/26703282/reading-file-from-the-internet-and-split-into-2" class="question-hyperlink">Reading file from the internet and split into 2</a></h3> <div class="excerpt">I am brand new to Python and try the following: I am reading a file from the internet and want to split it at a certain amount of lines. 1. File = line 1 to x 2. File = line x+1 to eof I use httplib2 to read the file from the internet and split…</div> <div class="grid ai-start jc-space-between fw-wrap"> <div class="grid gs4 fw-wrap tags "> <a href="../../questions/tagged/python" class="post-tag grid--cell" title="show questions tagged 'python'" rel="tag">python</a> <a href="../../questions/tagged/file" class="post-tag grid--cell" title="show questions tagged 'file'" rel="tag">file</a> <a href="../../questions/tagged/split" class="post-tag grid--cell" title="show questions tagged 'split'" rel="tag">split</a> <a href="../../questions/tagged/httplib2" class="post-tag grid--cell" title="show questions tagged 'httplib2'" rel="tag">httplib2</a> </div> <div class="started mt0"> <div class="s-user-card s-user-card"> <time class="s-user-card--time" datetime="asked Nov 02 '14 at 19:17">asked Nov 02 '14 at 19:17</time> <a href="../../users/4208143/andineier" class="s-avatar s-avatar__32 s-user-card--avatar"> <img class="s-avatar--image" src="../../users/profiles/4208143.webp" data-jdenticon-width="32" data-jdenticon-height="32" data-jdenticon-value="AndiNeier" /> </a> <div class="s-user-card--info"> <a href="../../users/4208143/andineier" class="s-user-card--link">AndiNeier</a> <ul class="s-user-card--awards"> <li class="s-user-card--rep" title="reputation score">1</li> <li class="s-award-bling s-award-bling__bronze" title="1 bronze badges">1</li> </ul> </div> </div> </div> </div> </div> </div> </div> <div class="s-pagination pager fr"> <a class="s-pagination--item" href="../../questions/tagged/httplib2_page=14" rel="prev" title="Go to page 14">Prev </a> <a class="s-pagination--item" href="../../questions/tagged/httplib2_page=1" rel="" title="Go to page 1">1</a> <a class="s-pagination--item" href="../../questions/tagged/httplib2_page=2" rel="" title="Go to page 2">2</a> <a class="s-pagination--item" href="../../questions/tagged/httplib2_page=3" rel="" title="Go to page 3">3</a> <div class="s-pagination--item s-pagination--item__clear">…</div> <a class="s-pagination--item" href="../../questions/tagged/httplib2_page=14" rel="" title="Go to page 14">14</a> <div class="s-pagination--item is-selected">15</div> </div> </div> </div> </div> </div> <script src="../../static/js/stack-icons.js"></script> <script src="../../static/js/fromnow.js"></script> </body> </html>