python html

S

Steve Young

Hi, I am looking for something where I can go through
a html page and make change the url's for all the
links, images, href's, etc... easily. If anyone knows
of something, please let me know. Thanks.

-steve



____________________________________________________
Start your day with Yahoo! - make it your home page
http://www.yahoo.com/r/hs
 
M

Mike Meyer

Steve Young said:
Hi, I am looking for something where I can go through
a html page and make change the url's for all the
links, images, href's, etc... easily. If anyone knows
of something, please let me know. Thanks.

I've been doing a lot of that today. But the tool I'm using is sh and
sed, because what I'm doing is captured nicely by regular expressions
on the URLs. You might consider that option.

If you have well-formed HTML, you can use the HTMLParser module, and
write out the mangled data as it passed through your sublcass of the
HTMLParser class.

If the HTML isn't well-formed (which is probably true for most of the
stuff on the web), you need a more understanding parser. I'd look into
using BeatifulSoup for this, though Iv'e only used it to extract
information from web pages, not to modify them.

<mike
 
L

lbolognini

Steve said:
Hi, I am looking for something where I can go through
a html page and make change the url's for all the
links, images, href's, etc... easily. If anyone knows
of something, please let me know. Thanks.

BeautifulSoup or PyMeld

Lorenzo
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,066
Latest member
VytoKetoReviews

Latest Threads

Top