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 6785121
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T17:05:14+00:00 2026-05-26T17:05:14+00:00

Please try this yourself :) ! curl http://www.windowsphone.com/en-US/apps?list=free the result is: <html><head><title>Object moved</title></head><body> <h2>Object

  • 0

Please try this yourself 🙂 !

curl http://www.windowsphone.com/en-US/apps?list=free

the result is:

    <html><head><title>Object moved</title></head><body>
<h2>Object moved to <a href="https://login.live.com/login.srf?wa=wsignin1.0&amp;rpsnv=11&amp;checkda=1&amp;ct=1320735308&amp;rver=6.1.6195.0&amp;wp=MBI&amp;wreply=http:%2F%2Fwww.windowsphone.com%2Fen-US%2Fapps%3Flist%3Dfree&amp;lc=1033&amp;id=268289">here</a>.</h2>
</body></html>

or

def download(source_url):
    try:
        socket.setdefaulttimeout(10)        
        agents = ['Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0)','Mozilla/4.0 (compatible; MSIE 7.0b; Windows NT 5.1)','Microsoft Internet Explorer/4.0b1 (Windows 95)','Opera/8.00 (Windows NT 5.1; U; en)']
        ree = urllib2.Request(source_url)
        ree.add_header('User-Agent',random.choice(agents))
        resp = urllib2.urlopen(ree)
        htmlSource = resp.read()
        return htmlSource
    except Exception, e:
        print e
        return ""

download('http://www.windowsphone.com/en-US/apps?list=free')

the result is:

<html><head><meta http-equiv="REFRESH" content="0; URL=http://www.windowsphone.com/en-US/apps?list=free"><script type="text/javascript">function OnBack(){}</script></head></html>

I want to download the actual source of the webpage.

  • 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-05-26T17:05:14+00:00Added an answer on May 26, 2026 at 5:05 pm

    The reason it fails is because http://www.windowsphone.com attempts to set a cookie, which is checked on https://login.live.com which creates another cookie and redirects back to windowsphone.com if successful.

    You should look into http://docs.python.org/library/cookielib.html

    If you want to use curl, allow it to create a cookie-file like so:

    curl -so /dev/null 'http://www.windowsphone.com/en-US/apps?list=free' -c 'myCookieJar'
    

    Run more myCookieJar in your shell and you’ll see something like this:

    # Netscape HTTP Cookie File
    # http://www.netscape.com/newsref/std/cookie_spec.html
    # This file was generated by libcurl! Edit at your own risk.
    
    .www.windowsphone.com   TRUE    /       FALSE   0       WPMSLSS SLSS=1
    login.live.com  FALSE   /       FALSE   0       MSPRequ lt=1320738008&co=1&id=268289
    

    Run (notice the -b option before ‘myCookieJar’):

    curl -so 'windowsphone.html' 'http://www.windowsphone.com/en-US/apps?list=free' -b 'myCookieJar'
    

    and you’ll get the contents of the page in the file windowsphone.html as you see it in your browser.

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

Sidebar

Related Questions

please try out this simple page: http://www.ynnova.it/ie9bug/tryit.html I use jquery 1.7.1 but I think
http://www.hanselman.com/blog/MixMobileWebSitesWithASPNETMVCAndTheMobileBrowserDefinitionFile.aspx To the sake of simplicity, please try out this. Basically, I am trying
I try this tutorials http://www.java2s.com/Code/Java/Velocity/UseVelocitytogenerateHTMLbasedemail.htm but, when i add css, it look like not
Here is google's hello world code for v3: http://code.google.com/apis/maps/documentation/javascript/tutorial.html#HelloWorld this loads and displays the
please try this link for getting my code. its working in all browsers not
Please try the following in Firefox (my version: 3.6.12). This was working and now
This is my first question here, so please try to be patient with me
I'm getting this error error PRJ0050: Failed to register output. Please try enabling Per-user
Ok this is going to get a bit chaotic so please try to stay
Can some please explain why this exception isn't caught. try { // This will

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.