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]&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">>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&rox=290466" class="qa">+</a>(1900)<a href="index38fd.html?le=591edbc2e62ea59770a3160ffd49e1b3&sox=290466" class="qa">-</a> <a href="indexb76c.html?le=591edbc2e62ea59770a3160ffd49e1b3&sux=290466" onClick="return confirm('Flag quote for review?');" class="qa">[X]</a></p><p class="qt"><raven> Any cat people here? I've got a problem with Nicky... <br /> <Leth> I've been known to be handy with a wok <br /> <Lore> Why, I'm a cat person. <br /> <raven> I took Morgan to the vet yesterday - he was gone for a total of 45 minutes, got two vaccs and a blood draw. <br /> <raven> Brought him home and Nicky went BALLISTIC. <br /> <raven> Spent the rest of the night yowling and hissing and attacking MOrgan. <br /> <CrazyClimber> nicky smells the hospital smells on morgan <br /> <Lore> Yeah, I've seen that happen. <br /> <raven> Is there anything I can do to get the hospital stink off him, then? Pack his carrier in coffe grounds or something? <br /> <tieboy> how about a bath <br /> <CrazyClimber> just give it a day or so <br /> <Lore> We tried catnip and butter, and neither worked. <br /> <agent_orange> butter? <br /> <agent_orange> you buttered your cat? <br /> <Lore> Yes. <br /> <raven> it's the best way to butter the house. <br /> <raven> Cats are effective butter delivery units. <br /> <Lore> We read somewhere to put butter on a cat's forehead. <br /> <agent_orange> did the emolient facilitate insertion? <br /> <Lore> And the other cat licks it off, and likes the first cat, because it tastes like butter. <br /> <Lore> As I said, it didn't work. <br /> <agent_orange> you read sopmewhere to put butter on the cats foreWHAT THE FUCK WERE YOU THINKING <br /> <tieboy> rub the two cats together vigorously until they smell like each other <br /> <agent_orange> piss on them both at the same time <br /> <tieboy> KITTY TASTES LIKE BUTTER <br /> <raven> It's more fun to put tape on their feet. <br /> <agent_orange> why not do both <br /> <agent_orange> and then get out the handycam <br /> <Lore> I believe what I was thinking was "Maybe it will work. And even if it doesn't, I get to butter the cat's forehead." <br /> <agent_orange> AFHV would *love* some footage of sticky-pawed, freshly buttered cats trying in vain to avoid a stream of steaming miller lite <br /> <Samwise> You know what helps with feuding cats, Lore? Sending me lots of cash. <br /> <agent_orange> now, see, I read somewhere -- <br /> <agent_orange> I think it was leviticus <br /> <agent_orange> -- that what you should do is frost them <br /> <agent_orange> betty crocker, right out of the can <br /> <raven> Chocolate or buttercream? <br /> <Leth> rave: go chocolate, buttercreme isn't pareve <br /> <CrazyClimber> you're frosting meat? <br /> <agent_orange> and then there'a always Cat Wellington <br /> <agent_orange> "What are you doing in the kitchen, dear?" "Just buttering the cat, pumpkin!" <br /> <agent_orange> "Why don't you baste the chicken while you're at it, too, dear?" "Baste the ... *light bulb* ...Sure! Sure, I'll 'baste the chicken'!" <br /> <CrazyClimber> a google images search for "buttered cat" returns a picture of isaac hayes <br /> <agent_orange> 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">>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"> © 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