Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8024801
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T22:58:02+00:00 2026-06-04T22:58:02+00:00

I called the following code to visit a url and tried to print the

  • 0

I called the following code to visit a url and tried to print the content on that page:

import urllib2
f = urllib2.urlopen("https://www.reaxys.com/reaxys/secured/customset.do?performed=true&action=get_preparations&searchParam=1287039&workflowId=1338317532514&workflowStep=1&clientDateTime=2012-05-29%2015:17")
page = f.read()
print page
f.close()

I’m not sure if the url is accessible everywhere, so the content on that page might not be accessible to everyone.

This page sets a time constraints on how long a user can stay on the page, and after that time, a popup would show up saying the user has reached the timeout.

Here’s the problem I bumped into:
When I typed the url into a browser, everything opened just fine. But when I tried printing what Python read from that page, Python read the page that would only pop out when the page has reached a timeout.

I don’t know what’s wrong, is it Python or the website? How can I make Python read the actual content on that page?

Thanks in advance.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T22:58:04+00:00Added an answer on June 4, 2026 at 10:58 pm

    It appears to be related to cookies being set by the website. If I visit the URL

    https://www.reaxys.com/reaxys/secured/customset.do?performed=true&action=get_preparations&searchParam=1287039&workflowId=1338317532514&workflowStep=1
    

    in my browser, I get the same timeout error. If I refresh, the site loads fine. But if I clear my cookies from the site and retry, I get the timeout again. So, I suspect that the site is executed some process that adds a timestamp and checks it before the page is visible, and defaults to a timeout if for some reason the cookie can’t be set (as would be the case with a visit from within a Python script).

    I would suggest doing an in-depth investigation of the cookies being set (start with the Javascript on that page, which seems to be handling some of the timeout logic), and then try setting cookies from the scraping process as per: http://www.testingreflections.com/node/view/5919 , http://stockrt.github.com/p/emulating-a-browser-in-python-with-mechanize/ , or the like.

    (This is in no way intended to condone the scraping of an Elsevier site, as they may come after you and eat your young 🙂 )

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Consider the following code. It's an anchor tag with an id called leader-module-total that
I have the following code that gets called after the view loads. It works
I have the following code in a static class called Methods that is archived
I have the following code: http://www.nomorepasting.com/getpaste.php?pasteid=22615 Which is called by the javascript mentioned in
I have a subprocess function (called parseContents) that gets called using the following code:
In brief: What is the pattern called in the following code, and how should
Does the following code will increase the allocated memory continuously as it is called
In the following code, when the ctor of X is called will the ctor
Why does the following code not allow foo(ptr) to be called ? #include <boost/scoped_ptr.hpp>
I'm using the following code to update a DataGridView's cell value. This is called

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.