473,385 Members | 1,942 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,385 software developers and data experts.

Session Timeout Webpages

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 and use python to access that page, it returns a "session timeout" error...I'm not sure what the language is behind the site, perhaps Javascript because "jsession" was associated with the session ID naming convention.

I've tried using urllib2.urlopen('website') to get the session id and then incorporate this into the link then pass it through again, but same problem exists.

I've also used win32com.dispatch(internetExplorer.application) to simulate a user browsing through the webpage, but to no success.

Can anyone out there help or suggest methods to overcome this problem?

Many thanks in advance!

Cheers
Dec 10 '07 #1
3 2507
dazzler
75
do you get the same timeout message with all www-sites?
maybe firewall is blocking your python application?
Dec 10 '07 #2
do you get the same timeout message with all www-sites?
maybe firewall is blocking your python application?
I am pretty sure that Python has access to all ports.

Take the following link:

http://www.yellowpages.com.au/browse/listingsSearch.do?sbs=&headingCode=29025&sortByAlp habetical=false&sortByClosestMatch=false&sortByDis tance=false&region=australia&sortByDetail=true&saf eLocationClue=All+States&stateId=9&currentLetter=

By the time you open this link, the session has already expired....you can try yourself as well.....go into any category from the yellow pages site, then use Python to open the same link you are viewing on IE...you can instanteously get a response saying the link has expired....now...copy and paste the exact same link into IE again and go....I think you get what I mean by now....

This is rather annoying...as I need to iterate through the pages....
Dec 10 '07 #3
dazzler
75
it might be quite hard to browse that page with python

you must use cookies with python (so the session id will be saved into cookie), I have no idea how to do it, maybe there's a simple solution available, google it ;D

try this one: if you disable your browser's cookies and go to that yellowpages sites, surf there a little bit and you will see that now that the session cookie cannot be saved into cookie because it's disable, the session id is now in your url address, something like this "jsessionid=70D2F96D52EA769F6A6DDF9FC4593277.yp305 _22122"

so you have two options:
use cookies with python modules
somehow include that session id into your url address
Dec 10 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

12
by: Geigho | last post by:
Setting session timeout in web.config file does not seem to have any effect. Any explanation or suggestion will be appreciated.
4
by: DavidS | last post by:
First: There are several ways to confuse one regarding session timeout. (1) web.config - <sessionState timeout="20"> (2) IIS Manager | Internet Information Services | ServerNode | Default Web Site...
8
by: Joe Abou Jaoude | last post by:
hi, I have a web app with forms authentication and a timeout session of 20 mins for security reasons. I recently added a feature that allows users (if they want to) to automatically log in...
11
by: Vishal | last post by:
Hello, can anybody tell me how I can extend the session expiry time? Is it done via code or via IIS? Sorry I am new and dont know about this.
17
by: jensen bredal | last post by:
Hello, i'm struggling with a somehow badly understood session scenario. I provide acces to my pages based on form authentication using Session cookies. Som of my pages are supposed to be...
4
by: UJ | last post by:
I have a page where the user can upload a video file. As you can guess, this may take a while. Is there a way I can change the session timeout for just this one page? I would also want to change...
2
by: Parrot | last post by:
I cannot get a session to stay active between web pages. I initialize a Session with variables and then execute a Response.Redirect(url,false); The called web page has a different sessionid that...
25
by: =?Utf-8?B?RGF2aWQgVGhpZWxlbg==?= | last post by:
I tried: <sessionState timeout="1"> </sessionState> bounced IIS, and after 1 minute still had a session. ??? -- thanks - dave
6
by: ChrisAtWokingham | last post by:
I have been struggling with unexpected error messages on an ASP.NET system, using SQL and C#. The application draws organisation charts, based on data stored in the SQL database. Some of the chart...
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: 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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.