Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #33623

proxy??

Path csiph.com!usenet.pasdenom.info!gegeweb.org!de-l.enfer-du-nord.net!feeder1.enfer-du-nord.net!rt.uk.eu.org!feed.xsnews.nl!border-2.ams.xsnews.nl!xlned.com!feeder1.xlned.com!newsfeed.xs4all.nl!newsfeed2.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
Return-Path <jaorozco@estudiantes.uci.cu>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.026
X-Spam-Evidence '*H*': 0.95; '*S*': 0.00; 'except:': 0.07; 'pages.': 0.07; 'try:': 0.07; 'urllib2': 0.07; 'port),': 0.09; 'def': 0.10; 'skip:p 40': 0.15; 'socketserver': 0.16; 'subject:proxy': 0.16; 'headers': 0.17; 'import': 0.21; 'header:User-Agent:1': 0.26; 'there.': 0.28; 'received:10.0.0': 0.28; 'class': 0.29; "i'm": 0.29; 'knows': 0.30; "skip:' 10": 0.30; 'print': 0.32; 'received:10.0': 0.33; 'anyone': 0.33; 'to:addr:python-list': 0.33; 'doing': 0.35; 'but': 0.36; 'header:Received:9': 0.36; 'problems': 0.36; 'does': 0.37; 'some': 0.38; 'received:10': 0.38; 'gives': 0.39; 'to:addr:python.org': 0.39; 'received:unknown': 0.63; 'url:facebook': 0.67; 'received:200': 0.71; 'futuro,': 0.84; 'universidad': 0.84; 'url:photos': 0.84; 'url:cu': 0.91
X-Virus-Scanned amavisd-new at uci.cu
Date Tue, 20 Nov 2012 09:48:19 -0500
From Jorge Alberto Diaz Orozco <jaorozco@estudiantes.uci.cu>
User-Agent Mozilla/5.0 (X11; Linux i686; rv:16.0) Gecko/20121010 Thunderbird/16.0.1
MIME-Version 1.0
To python-list@python.org
Subject proxy??
Content-Type text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding 7bit
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.60.1353422916.29569.python-list@python.org> (permalink)
Lines 28
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1353422916 news.xs4all.nl 6900 [2001:888:2000:d::a6]:41197
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:33623

Show key headers only | View raw


Hi there.
Does anyone knows how to manage headers using a simple proxy???
I'm doing this but It gives me problems In some pages.

import SocketServer
import SimpleHTTPServer
import urllib2

PORT = 8888

class Proxy(SimpleHTTPServer.SimpleHTTPRequestHandler):
     def do_GET(self):
         try:
             print self.path
             self.copyfile(urllib2.urlopen(self.path), self.wfile)
         except:
             print 'error',self.path

httpd = SocketServer.ForkingTCPServer(('127.0.0.1', PORT), Proxy)
print "serving at port", PORT
httpd.serve_forever()

10mo. ANIVERSARIO DE LA CREACION DE LA UNIVERSIDAD DE LAS CIENCIAS INFORMATICAS...
CONECTADOS AL FUTURO, CONECTADOS A LA REVOLUCION

http://www.uci.cu
http://www.facebook.com/universidad.uci
http://www.flickr.com/photos/universidad_uci

Back to comp.lang.python | Previous | Next | Find similar | Unroll thread


Thread

proxy?? Jorge Alberto Diaz Orozco <jaorozco@estudiantes.uci.cu> - 2012-11-20 09:48 -0500

csiph-web