Skip to content

Magenaut

  • Home
  • Topics
    • Notes
    • Tutorial
    • Bug fixing
    • Extension
    • Server
  • Q&A
  • Privacy Policy
  • About

urllib2

Python: URLError: <urlopen error [Errno 10060]

August 18, 2022 by Magenaut

OS: Windows 7; Python 2.7.3 using the Python GUI Shell

Categories Python, Q&A Tags python, python-2.7, urllib, urllib2 Leave a comment

A good way to get the charset/encoding of an HTTP response in Python

August 18, 2022 by Magenaut

Looking for an easy way to get the charset/encoding information of an HTTP response using Python urllib2, or any other Python library.

Categories Python, Q&A Tags character-encoding, httprequest, python, urllib2 Leave a comment

Python: download files from google drive using url

August 17, 2022 by Magenaut

I am trying to download files from google drive and all I have is the drive’s URL.

Categories Python, Q&A Tags download, google-drive-api, pydrive, python, urllib2 Leave a comment

Python Urllib2 SSL error

August 17, 2022 by Magenaut

Python 2.7.9 is now much more strict about SSL certificate verification. Awesome!

Categories Python, Q&A Tags python, ssl, urllib2 Leave a comment

Using MultipartPostHandler to POST form-data with Python

August 17, 2022 by Magenaut

Problem: When POSTing data with Python’s urllib2, all data is URL encoded and sent as Content-Type: application/x-www-form-urlencoded. When uploading files, the Content-Type should instead be set to multipart/form-data and the contents be MIME-encoded.

Categories Python, Q&A Tags file, multipartform-data, python, upload, urllib2 Leave a comment

Python-Requests close http connection

August 17, 2022 by Magenaut

I was wondering, how do you close a connection with Requests (python-requests.org)?

Categories Python, Q&A Tags http, httplib, python, python-requests, urllib2 Leave a comment

Python URLLib / URLLib2 POST

August 17, 2022 by Magenaut

I’m trying to create a super-simplistic Virtual In / Out Board using wx/Python. I’ve got the following code in place for one of my requests to the server where I’ll be storing the data:

Categories Python, Q&A Tags post, python, urllib, urllib2 Leave a comment

How do I prevent Python’s urllib(2) from following a redirect

August 17, 2022 by Magenaut

I am currently trying to log into a site using Python however the site seems to be sending a cookie and a redirect statement on the same page. Python seems to be following that redirect thus preventing me from reading the cookie send by the login page. How do I prevent Python’s urllib (or urllib2) urlopen from following the redirect?

Categories Python, Q&A Tags python, urllib2 Leave a comment

Python: HTTP Post a large file with streaming

August 16, 2022 by Magenaut

I’m uploading potentially large files to a web server. Currently I’m doing this:

Categories Python, Q&A Tags http, python, urllib2 Leave a comment

python: urllib2 how to send cookie with urlopen request

August 16, 2022 by Magenaut

I am trying to use urllib2 to open url and to send specific cookie text to the server. E.g. I want to open site Solve chess problems, with a specific cookie, e.g. search=1. How do I do it?

Categories Python, Q&A Tags python, urllib2 Leave a comment
Older posts
Newer posts
← Previous Page1 Page2 Page3 Page4 Next →
  1. michealSmith07 on Is there a way to dynamically refresh the less command?August 21, 2022

    That is a very nice post. I like this post.

  2. anonymous on Fix libwacom9 dependency issue when upgrade DebianJune 27, 2022

    saved my day!! Thanks for the help…

  3. sreedhar on Fix libwacom9 dependency issue when upgrade DebianMay 10, 2022

    Thanks its working

  4. saintnick on Fix libwacom9 dependency issue when upgrade DebianMay 10, 2022

    remove libwacom2 worked for me as well

  5. ranafoul on Fix libwacom9 dependency issue when upgrade DebianApril 22, 2022

    apt remove libwacom2 helped on kali 2022.01. gr8

.net ajax asp.net asp.net-core asp.net-mvc asp.net-mvc-3 asp.net-mvc-4 asp.net-web-api bash c# command-line css custom-post-types custom-taxonomy dataframe dictionary django entity-framework functions gridview html iis javascript jquery json linux list matplotlib numpy pandas php plugin-development plugins posts python python-2.7 python-3.x security shell shell-script sql string vb.net webforms wp-query

© 2026 Magenaut • Built with GeneratePress