Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
BeautifulSoup silent failure on Centos 6
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  2 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Jim Rainville  
View profile  
 More options Sep 23 2012, 6:22 pm
From: Jim Rainville <j...@rainville.net>
Date: Sun, 23 Sep 2012 15:22:54 -0700 (PDT)
Local: Sun, Sep 23 2012 6:22 pm
Subject: BeautifulSoup silent failure on Centos 6

Hi - I'm trying to get started with BeautifulSoup on CentOS 6. I'm running
Python 2.6.6. I installed BeautifulSoup4 with pip and all seemed to be
working. I have a test page that I want to start with so I tried this:

>>> from bs4 import BeautifulSoup
>>> soup = BeautifulSoup(open('test.html'))
>>> print (soup.prettify())

Nothing comes out. So the I backed up and ran the first case right out of
the tutorial:

>>> html_doc = """

... <html><head><title>The Dormouse's story</title></head>
...
... <p class="title"><b>The Dormouse's story</b></p>
...
... <p class="story">Once upon a time there were three little sisters; and
their names were
... <a href="http://example.com/elsie" class="sister" id="link1">Elsie</a>,
... <a href="http://example.com/lacie" class="sister" id="link2">Lacie</a>
and
... <a href="http://example.com/tillie" class="sister"
id="link3">Tillie</a>;
... and they lived at the bottom of a well.</p>
...
... <p class="story">...</p>
... """

>>> soup = BeautifulSoup(html_doc)
>>> print(soup.prettify())

Still nothing. What am I doing wrong here?

Thanks for your help.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Kelly Dodge  
View profile  
 More options Jan 17, 4:32 pm
From: Kelly Dodge <kelly.do...@gmail.com>
Date: Thu, 17 Jan 2013 13:32:57 -0800 (PST)
Local: Thurs, Jan 17 2013 4:32 pm
Subject: Re: BeautifulSoup silent failure on Centos 6

I ran into the same problem.  I had to install a 3rd party parser:

http://www.crummy.com/software/BeautifulSoup/bs4/doc/#installing-a-pa...


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »