Re: major HTML scubbing needed

Paul <[email protected]>
Newsgroups gmane.comp.windows.shells.litestep
Message-ID <[email protected]>
Tobbe Lundberg wrote:
> This peice of Python will print four random quotes from bash.org:
> http://rafb.net/p/CWptde33.html
> You will need Beautiful Soup for it to work:
> http://www.crummy.com/software/BeautifulSoup/ (you just have to place
> the BeautifulSoup.py file in the same directory as the bash ripping
> ..py file)
> 
> //Tobbe
> 
> On 2/23/07, Sascha Nemecek <[email protected]> wrote:
>> Maybe a simple grep under linux will do. Could you post an example of
>> the HTML code?

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>

<!-- Mirrored from bash.org/?290466 by HTTrack Website Copier/3.x 
[XR&CO'2005], Fri, 23 Feb 2007 10:53:21 GMT -->
<head>
	<title>QDB: Quote #290466</title>
	<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
	<style type="text/css">
	<!--
		.smalltext {font-family: arial, helvetica, sans-serif;font-size: 
10px;background-color: #f0f0f0;color: #000000}
		.seltext {font-family: arial, helvetica, sans-serif;font-size: 
10px;background-color: #ffffff;color: #000000}	
		input.text {color: #000000; background-color: #ffffff;}
		textarea {color: #000000; background-color: #ffffff;}
		select {color: #000000; background-color: #ffffff;}
		.qt {
			font-family: courier new, lucida console, fixed;
			font-size: 10pt;
			margin-top: 0px;
		}
		.qa {
			font-family: default;
			font-size: 8pt;
			text-decoration: none;
		}
		input.button {
			background-color: #c08000;
			color: #000000;
		}
		p.quote {
			font-family: courier new, lucida console, fixed;
			font-size: smaller;
			margin-bottom: 0px;
		}
		.bodytext {
			font-family: arial, helvetica, sans-serif;
			line-height: 21px;
			font-size: smaller;
			color: #000000;
		}
		.footertext {
			font-family: arial, helvetica, sans-serif;
			font-size: smaller;
		}
		.toplinks {
			font-family: arial, helvetica, sans-serif;
			color: #000000;
			font-size: smaller;
		}
		.topnum {font-family: arial, helvetica, sans-serif; color: #000000;}

	-->
	</style>


</head>

<body bgcolor="#ffffff" text="#000000" link="#c08000" vlink="#c08000" 
alink="#c08000">

<form action="http://bash.org/?" name="tsearch">
<center>
<table cellpadding="2" cellspacing="0" width="80%" border="0">
	<tr>
		<td bgcolor="#c08000" align="left">
			<font size="+1"><b><i>QDB</i></b></font>
		<a href="index2123.html?admin"><font size="-1" 
color="#c08000">Admin</font></a></td>
		
		<td bgcolor="#c08000" align="right">
			<font face="arial" size="+1"><b>Quote #290466</b></font><br></td>
	</tr></table>
	<table cellpadding="2" cellspacing="0" width="80%" border="0">
	<tr>
		<td class="footertext" align="left" bgcolor="#f0f0f0">
	<a 
href="https://www.paypal.com/xclick/[email protected]&amp;item_name=Bash.org+Donation">Paypal 
Donate</a></td> 	<td align="right" bgcolor="#f0f0f0" class="toplinks" 
colspan="2">
  <a href="index.html">Home</a> / <a 
href="index71cc.html?latest">Latest</a> / <a 
href="indexbeef.html?browse">Browse</a>
  / <a href="index7ddf.html?random">Random</a> <a 
href="indexac2b.html?random1">&gt;0</a>
  / <a href="indexb283.html?top">Top 100</a><a 
href="index8cdd.html?top2">-200</a> / <a 
href="index34ec.html?add"><b>Add Quote</b></a>
  / <a href="modapp/index.html">ModApp</a> / <a 
href="index06a9.html?search">Search</a> / <font class="topnum">#</font> 
<input type="text" name="quote" class="smalltext" size="4">
		</td>
	</tr>
</table>
</form>
</center><p>

<center>
<table cellpadding="2" cellspacing="0" width="80%">
<tr><td valign='top'>
<p class="quote"><a href="indexd83c.html?290466" title="Permanent link 
to this quote."><b>#290466</b></a> <a 
href="index69fa.html?le=591edbc2e62ea59770a3160ffd49e1b3&amp;rox=290466" 
class="qa">+</a>(1900)<a 
href="index38fd.html?le=591edbc2e62ea59770a3160ffd49e1b3&amp;sox=290466" 
class="qa">-</a> <a 
href="indexb76c.html?le=591edbc2e62ea59770a3160ffd49e1b3&amp;sux=290466" 
onClick="return confirm('Flag quote for review?');" 
class="qa">[X]</a></p><p class="qt">&lt;raven&gt; Any cat people here? 
I've got a problem with Nicky... <br />
&lt;Leth&gt; I've been known to be handy with a wok <br />
&lt;Lore&gt; Why, I'm a cat person. <br />
&lt;raven&gt; I took Morgan to the vet yesterday - he was gone for a 
total of 45 minutes, got two vaccs and a blood draw. <br />
&lt;raven&gt; Brought him home and Nicky went BALLISTIC. <br />
&lt;raven&gt; Spent the rest of the night yowling and hissing and 
attacking MOrgan. <br />
&lt;CrazyClimber&gt; nicky smells the hospital smells on morgan <br />
&lt;Lore&gt; Yeah, I've seen that happen. <br />
&lt;raven&gt; Is there anything I can do to get the hospital stink off 
him, then? Pack his carrier in coffe grounds or something? <br />
&lt;tieboy&gt; how about a bath <br />
&lt;CrazyClimber&gt; just give it a day or so <br />
&lt;Lore&gt; We tried catnip and butter, and neither worked. <br />
&lt;agent_orange&gt; butter? <br />
&lt;agent_orange&gt; you buttered your cat? <br />
&lt;Lore&gt; Yes. <br />
&lt;raven&gt; it's the best way to butter the house. <br />
&lt;raven&gt; Cats are effective butter delivery units. <br />
&lt;Lore&gt; We read somewhere to put butter on a cat's forehead. <br />
&lt;agent_orange&gt; did the emolient facilitate insertion? <br />
&lt;Lore&gt; And the other cat licks it off, and likes the first cat, 
because it tastes like butter. <br />
&lt;Lore&gt; As I said, it didn't work. <br />
&lt;agent_orange&gt; you read sopmewhere to put butter on the cats 
foreWHAT THE FUCK WERE YOU THINKING <br />
&lt;tieboy&gt; rub the two cats together vigorously until they smell 
like each other <br />
&lt;agent_orange&gt; piss on them both at the same time <br />
&lt;tieboy&gt; KITTY TASTES LIKE BUTTER <br />
&lt;raven&gt; It's more fun to put tape on their feet. <br />
&lt;agent_orange&gt; why not do both <br />
&lt;agent_orange&gt; and then get out the handycam <br />
&lt;Lore&gt; I believe what I was thinking was &quot;Maybe it will work. 
And even if it doesn't, I get to butter the cat's forehead.&quot; <br />
&lt;agent_orange&gt; AFHV would *love* some footage of sticky-pawed, 
freshly buttered cats trying in vain to avoid a stream of steaming 
miller lite <br />
&lt;Samwise&gt; You know what helps with feuding cats, Lore? Sending me 
lots of cash. <br />
&lt;agent_orange&gt; now, see, I read somewhere -- <br />
&lt;agent_orange&gt; I think it was leviticus <br />
&lt;agent_orange&gt; -- that what you should do is frost them <br />
&lt;agent_orange&gt; betty crocker, right out of the can <br />
&lt;raven&gt; Chocolate or buttercream? <br />
&lt;Leth&gt; rave: go chocolate, buttercreme isn't pareve <br />
&lt;CrazyClimber&gt; you're frosting meat? <br />
&lt;agent_orange&gt; and then there'a always Cat Wellington <br />
&lt;agent_orange&gt; &quot;What are you doing in the kitchen, 
dear?&quot; &quot;Just buttering the cat, pumpkin!&quot; <br />
&lt;agent_orange&gt; &quot;Why don't you baste the chicken while you're 
at it, too, dear?&quot; &quot;Baste the ... *light bulb* ...Sure! Sure, 
I'll 'baste the chicken'!&quot; <br />
&lt;CrazyClimber&gt; a google images search for &quot;buttered cat&quot; 
returns a picture of isaac hayes <br />
&lt;agent_orange&gt; chocolate salty cat balls</p>
</td>
<td valign='top'></td></tr></table>
</center>
<center>
<table border="0" cellpadding="2" cellspacing="0" width="80%" 
bgcolor="#c08000"><tr><td bgcolor="#f0f0f0" class="toplinks" 
colspan=2><a href="index.html">Home</a> / <a 
href="index71cc.html?latest">Latest</a> / <a 
href="indexbeef.html?browse">Browse</a> /
<a href="index7ddf.html?random">Random</a> <a 
href="indexac2b.html?random1">&gt;0</a> / <a 
href="indexb283.html?top">Top 100</a><a 
href="index8cdd.html?top2">-200</a> /
<a href="index34ec.html?add"><B>Add Quote</B></a> / <a 
href="index06a9.html?search">Search</a> / <a 
href="modapp/index.html">ModApp</a></td>
</tr>
<tr>
<td class="footertext" align="left">0.0223</td><td class="footertext" 
align="right"> 19732 quotes approved; 8893 quotes pending</td>
</tr>
</table>

<font size="-1">
&#169; QDB 1999-2007, All Rights Reserved.
</font>
</center>

<div style="visibility:hidden;"><img 
src="http://64.74.219.10/animation.gif"></div>

</body>

<!-- Mirrored from bash.org/?290466 by HTTrack Website Copier/3.x 
[XR&CO'2005], Fri, 23 Feb 2007 10:53:21 GMT -->
</html>


>>
>> Sascha
>>
>> Brian Wolven wrote:
>> > Paul wrote:
>> >> Brian Wolven wrote:
>> >>> Paul wrote:
>> >>>> OK, all this talk of Bash got me all hot and bothered. I am
>> >>>> downloading the entire website now. I will weed out all the tiny
>> >>>> nothing pages and only keep the pages that have quotes on them. Once
>> >>>> that is done, we need to find a way to remove all the extraneous
>> >>>> HTML junk.
>> >>>>
>> >>>> Brian, this sounds right up your alley. I am assuming that all the
>> >>>> quote pages formatting will be identical, otherwise it will be for
>> >>>> naught. If they are, could a VBS script be written to parse out
>> >>>> plain text that we could then convert into one line quotes line our
>> >>>> quotes file?
>> >>>
>> >>> You mean you can't just do it with wazup.dll? ;)
>> >>
>> >> I didn't think so. Otherwise it would have been done by now right?
>> >
>> > I bet rabidcow can do it in DOS.
>> >
>> >
>> > ---------------------------------------------------------------------
>> >    Can't Unsubscribe? Check http://desktopian.org/listunsub.html
>> >        LS List Homepage: http://wuzzle.org/list/litestep.php
>> >            Get the LS FAQ: http://lsfaq.shellfront.org
>>
>> ---------------------------------------------------------------------
>>     Can't Unsubscribe? Check http://desktopian.org/listunsub.html
>>         LS List Homepage: http://wuzzle.org/list/litestep.php
>>             Get the LS FAQ: http://lsfaq.shellfront.org
>>
>>
> 
> ---------------------------------------------------------------------
>    Can't Unsubscribe? Check http://desktopian.org/listunsub.html
>        LS List Homepage: http://wuzzle.org/list/litestep.php
>            Get the LS FAQ: http://lsfaq.shellfront.org
> 
> 


---------------------------------------------------------------------
    Can't Unsubscribe? Check http://desktopian.org/listunsub.html
        LS List Homepage: http://wuzzle.org/list/litestep.php
            Get the LS FAQ: http://lsfaq.shellfront.org
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.