10-12-2019
Are you using BeautifulSoup 3 or BeautifulSoup 4?
Beautiful Soup Documentation — Beautiful Soup 4.4.0 documentation
Quote:
Beautiful Soup is a Python library for pulling data out of HTML and XML files. It works with your favorite parser to provide idiomatic ways of navigating, searching, and modifying the parse tree. It commonly saves programmers hours or days of work.
These instructions illustrate all major features of Beautiful Soup 4, with examples. I show you what the library is good for, how it works, how to use it, how to make it do what you want, and what to do when it violates your expectations.
The examples in this documentation should work the same way in Python 2.7 and Python 3.2.
You might be looking for the documentation for Beautiful Soup 3. If so, you should know that Beautiful Soup 3 is no longer being developed, and that Beautiful Soup 4 is recommended for all new projects. If you want to learn about the differences between Beautiful Soup 3 and Beautiful Soup 4, see Porting code to BS4.
9 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I heard that its a new programming language but ill like to get a deeper explaination of it. (1 Reply)
Discussion started by: kprescod4158
1 Replies
2. Programming
Hello,
Is there some type of functional way to read things in the Python shell interpreter similar to less or more in the bash (and other) command line shells?
Example:
>>> import subprocess
>>> help(subprocess)
...
...
I'm hoping so as I hate scrolling and love how less works with... (0 Replies)
Discussion started by: Narnie
0 Replies
3. Programming
Hi everybody,
I've been experimenting with Python lately and for the most part it's been a smooth ride. I have one little problem that maybe one of you can help me with.
PROBLEM:
I have list with one word per line.
EXAMPLE
apples
oranges
pears
grapes
etc...
I also have a shell... (2 Replies)
Discussion started by: o0110o
2 Replies
4. SuSE
Okay, so I have had this problem on openSUSE, and Debian systems now and I am hoping for a little help. I think it has something to do with Python but I couldn't find a proper Python area here.
I am trying to redirect the output of "ssh suse-server 'python -V'" to a file. It seems that no matter... (3 Replies)
Discussion started by: Druonysus
3 Replies
5. UNIX for Dummies Questions & Answers
Hi all...
Not sure where to put this so I put it here...
All comments welcome...
1) Is the Python language now considered a part of the *NIX transient command structure much like Perl, (and awk)?
2) If so which OSes now have it as part of a "default" install - NOT an extra to be... (5 Replies)
Discussion started by: wisecracker
5 Replies
6. Shell Programming and Scripting
I am working on requirement on spreadsheet in python scripting.
I have a spreadsheet containing cell values and with background color.
I am able to read the value value but unable to get the background color of that particular cell.
Actually my requirement is to read the cell value along... (1 Reply)
Discussion started by: giridhar276
1 Replies
7. Shell Programming and Scripting
I am writing a little python script that needs to grab version numbers between "<td>4.2.2</td>" within the tbody of the page:
blah blah blah blah blah
Is it possible to use a one-liner to scrap only the digits between the tags:
"<td>4.2.2</td>"
so it spits out:
4.2.2
4.2.1
etc..... (2 Replies)
Discussion started by: metallica1973
2 Replies
8. Windows & DOS: Issues & Discussions
Hi all,
I am trying to run below python code for connecting remote windows machine from unix to run an python file exist on that remote windows machine..
Below is the code I am trying:
#!/usr/bin/env python
import wmi
c = wmi.WMI("xxxxx", user="xxxx", password="xxxxxxx")... (1 Reply)
Discussion started by: onenessboy
1 Replies
9. Programming
Hi all...
As you know I like making code backwards compatible for as many platforms as possible.
This Python script was in fact dedicated for the AMIGA A1200 using Pythons 1.4.0, 1.5.2, 1.6.0, 2.0.1, and 2.4.6 as that is all we have for varying levels of upgrades from a HDD and 4MB FastRam... (1 Reply)
Discussion started by: wisecracker
1 Replies
LEARN ABOUT SUSE
battlestar
BATTLESTAR(6) BSD Games Manual BATTLESTAR(6)
NAME
battlestar -- a tropical adventure game
SYNOPSIS
battlestar [-r] [saved-file]
DESCRIPTION
battlestar is an adventure game in the classic style. However, it's slightly less of a puzzle and more a game of exploration. There are a
few magical words in the game, but on the whole, simple English should suffice to make one's desires understandable to the parser.
THE SETTING
In the days before the darkness came, when battlestars ruled the heavens...
Three He made and gave them to His daughters,
Beautiful nymphs, the goddesses of the waters.
One to bring good luck and simple feats of wonder,
Two to wash the lands and churn the waves asunder,
Three to rule the world and purge the skies with thunder.
In those times great wizards were known and their powers were beyond belief. They could take any object from thin air, and, uttering the
word 'su' could disappear.
In those times men were known for their lust for gold and desire to wear fine weapons. Swords and coats of mail were fashioned that could
withstand a laser blast.
But when the darkness fell, the rightful reigns were toppled. Swords and helms and heads of state went rolling across the grass. The entire
fleet of battlestars was reduced to a single ship.
SAMPLE COMMANDS
take --- take an object
drop --- drop an object
wear --- wear an object you are holding
draw --- carry an object you are wearing
put on --- take an object and wear it
take off -- draw an object and drop it
throw <object> <direction>
! <shell esc>
IMPLIED OBJECTS
>-: take watermelon
watermelon:
Taken.
>-: eat
watermelon:
Eaten.
>-: take knife and sword and apple, drop all
knife:
Taken.
broadsword:
Taken.
apple:
Taken.
knife:
Dropped.
broadsword:
Dropped.
apple:
Dropped.
>-: get
knife:
Taken.
Notice that the "shadow" of the next word stays around if you want to take advantage of it. That is, saying "take knife" and then "drop"
will drop the knife you just took.
SCORE & INVEN
The two commands ``score'' and ``inven'' will print out your current status in the game.
SAVING A GAME
The command ``save'' will save your game in a file called .Bstar in your home directory by default. You can recover a saved game by using
the -r option when you start up the game, or by giving the name of the saved file as an argument. Save files will be saved to and restored
from your home directory unless a path is specified - i.e., ``battlestar -r savedgame'' will look for savedgame in your home directory, but
``battlestar -r ./savedgame'' will look in the current directory. ``battlestar -r'' will look for the default file, .Bstar in your home
directory.
DIRECTIONS
The compass directions N, S, E, and W can be used if you have a compass. If you don't have a compass, you'll have to say R, L, A, or B,
which stand for Right, Left, Ahead, and Back. Directions printed in room descriptions are always printed in R, L, A, and B relative direc-
tions.
HISTORY
I wrote Battlestar in 1979 in order to experiment with the niceties of the C Language. Most interesting things that happen in the game are
hardwired into the code, so don't send me any hate mail about it! Instead, enjoy art for art's sake!
AUTHOR
David Riggle
INSPIRATION & ASSISTANCE
Chris Guthrie
Peter Da Silva
Kevin Brown
Edward Wang
Ken Arnold & Company
BUGS
Countless.
FAN MAIL
Send to edward%ucbarpa@berkeley.arpa, chris%ucbcory@berkeley.arpa, riggle.pa@xerox.arpa.
BSD
September 7, 2000 BSD