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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T11:29:41+00:00 2026-06-15T11:29:41+00:00

The title pretty much says it all. Here’s my code: from urllib2 import urlopen

  • 0

The title pretty much says it all. Here’s my code:

from urllib2 import urlopen as getpage
print = getpage("www.radioreference.com/apps/audio/?ctid=5586")

and here’s the traceback error I get:

Traceback (most recent call last):
  File "C:/Users/**/Dropbox/Dev/ComServ/citetest.py", line 2, in <module>
    contents = getpage("www.radioreference.com/apps/audio/?ctid=5586")
  File "C:\Python25\lib\urllib2.py", line 121, in urlopen
    return _opener.open(url, data)
  File "C:\Python25\lib\urllib2.py", line 366, in open
    protocol = req.get_type()
  File "C:\Python25\lib\urllib2.py", line 241, in get_type
    raise ValueError, "unknown url type: %s" % self.__original
ValueError: unknown url type: www.radioreference.com/apps/audio/?ctid=5586

My best guess is that urllib can’t retrieve data from untidy php URLs. if this is the case, is there a work around? If not, what am I doing wrong?

  • 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-15T11:29:42+00:00Added an answer on June 15, 2026 at 11:29 am

    You should first try to add 'http://' in front of the url. Also, do not store the results in print, as it is binding the reference to another (non callable) object.

    So this line should be:

    page_contents = getpage("http://www.radioreference.com/apps/audio/?ctid=5586")
    

    This returns a file like object. To read its contents you need to use different file manipulation methods, like this:

    for line in page_contents.readlines():
        print line
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

The title pretty much says it all, so here's the code: #include <stdio.h> /*
Title pretty much says it all. The web.config, unchanged from how VS2008SP1 generated it,
The title pretty much says it all, but here's some background. We have a
well, the title pretty much says it all. here's a little info: i have
The title pretty much says it all. If I have something like (from PHP
The title pretty much says it all, but basically I have a main parent
The title pretty much says it all, but in SQL Server 2005 Management Studio,
The title pretty much says it all. When I'm doing some reflection through my
The title pretty much says it all. How can I view the original SQL
The title pretty much says it all, how do I know if I'm getting

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.