473,379 Members | 1,542 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,379 software developers and data experts.

How to make URLLIB .urlopen(url1) .urlopen(url2) session related ?

How can I make 2 visits to a website session related with python's urllib?
For example, I want my first visit to login ebay.com, next visit to
obtain my listed items info on ebay. How can I make it?

Most web servers use session management (most use cookies), but how
can I tackle session communications at client side?

Appreciate any helps.
Jul 18 '05 #1
5 6875
"Xu, C.S." wrote:

How can I make 2 visits to a website session related with python's urllib?
For example, I want my first visit to login ebay.com, next visit to
obtain my listed items info on ebay. How can I make it?

Most web servers use session management (most use cookies), but how
can I tackle session communications at client side?


http://wwwsearch.sourceforge.net/ClientCookie/

-Peter
Jul 18 '05 #2
Peter Hansen <pe***@engcorp.com> writes:
"Xu, C.S." wrote:

How can I make 2 visits to a website session related with python's urllib?
For example, I want my first visit to login ebay.com, next visit to
obtain my listed items info on ebay. How can I make it?

Most web servers use session management (most use cookies), but how
can I tackle session communications at client side?


http://wwwsearch.sourceforge.net/ClientCookie/


Cookies aren't the only state, so make sure to read 3rd paragraph of
this, too:

http://wwwsearch.sourceforge.net/Cli...html#debugging
I should move most of that to the general FAQ page...
John
Jul 18 '05 #3
jj*@pobox.com (John J. Lee) schreef:
Cookies aren't the only state,


Your "Referer" handler works good too... :-)

But the "HTTP-EQUIV"/"Refresh" handler seems to have some problems.
(I'll mail you about this when I know what exactly triggers the problem I
have--I suspect some illegal HTML...)

--
JanC

"Be strict when sending and tolerant when receiving."
RFC 1958 - Architectural Principles of the Internet - section 3.9
Jul 18 '05 #4
ClientCookie works great with ebay, and a few other sites I'm interested.

I'd like to donate a few bucks for the author to buy several cups of
coffee during writing more interesting python modules. Where should I
send the money to? Paypal, or check?

ClientCookie will save me a lot time, guaranteed!
Jul 18 '05 #5
xu*****@yahoo.com (Xu, C.S.) writes:
ClientCookie works great with ebay, and a few other sites I'm interested.

I'd like to donate a few bucks for the author to buy several cups of
coffee during writing more interesting python modules. Where should I
send the money to? Paypal, or check?

[...]

Rest assured my postal address will quickly find its way to you! :-))
John
Jul 18 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Gary Feldman | last post by:
I think I've found a deficiency in the design of urllib related to https. In order to complete an https connection, it appears that URLOpener and hence FancyURLOpener require the key and cert...
2
by: John F Dutcher | last post by:
Can anyone comment on why the code shown in the Python error is in some way incorrect...or is there a problem with Python on my hoster's site ?? The highlites don't seem to show here...but line...
8
by: Radioactive Man | last post by:
I am fairly new to the latest verion of Python and using it on windows 95, 2000, and/or XP. What libraries, modules, functions, etc. would I need to set up a Python script to download a file, say...
11
by: Johnny Lee | last post by:
Hi, I was using urllib to grab urls from web. here is the work flow of my program: 1. Get base url and max number of urls from user 2. Call filter to validate the base url 3. Read the source...
2
by: EvanPMth | last post by:
I have tried multiple ways of posting information to a website and have failed. my first attempt was out of the docs: import httplib, urllib params = urllib.urlencode({'email' : 'a@a.com',...
1
by: onceuponapriori | last post by:
Greetings gents. I'm a Railser working on a django app that needs to do some scraping to gather its data. I need to programatically access a site that requires a username and password. Once I...
8
by: zdp | last post by:
Hello! I need to process some webpages of a forum which is powered by discuz!. When I login, there are some options about how long to keep the cookies: forever, month, week, et al. If I choose...
3
by: Tofubia | last post by:
Hi, This is kinda new to me but I'm desparate for some help on python programming!! I'm currently writing a scrape for a site, but unfortunately, everytime I copy and paste the link into python...
4
by: mark | last post by:
I've recently switched from Ubuntu to OS X Leopard. I have some python scripts which download info from the web. The scripts were working fine before on Ubuntu, but urllib seems to work really...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.