On Wednesday, 2 July 2008 06:37:53 UTC+5:30, luismgz wrote:
>
> I also use BeautifulSoup and it works great.
> This is a little sample (modified from the BeautifulSoup's site) to
> scrap data from a site and email the results:
>
> class soup(app.page):
> def GET(self):
> web.header('Content-Type', 'text/html')
> from google.appengine.api import urlfetch
> from BeautifulSoup import BeautifulSoup
> from google.appengine.api import mail
>
> page = urlfetch.fetch("http://www.icc-ccs.org/prc/
> piracyreport.php <http://www.icc-ccs.org/prc/piracyreport.php>")
> soup = BeautifulSoup(page.content)
> s = []
> for incident in soup('td', width="90%"):
> where, linebreak, what = incident.contents[:3]
> s.append(where.strip())
> s.append(what.strip())
> res = '<br>'.join(s)
>
> mail.send_mail(
> sender="[email protected] <javascript:>",
> to="Joe <[email protected] <javascript:>>",
> subject="Latest piracy incidents report",
> body= '\n'.join(s),
> html= res
> )
> return res
>
>
sir can u plz help me i am a student dng my project web scrapping it
exactly looks like ur code,,so I need to code it plz do help me sir,,,give
me the above exact code
--
You received this message because you are subscribed to the Google Groups
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/google-appengine.
For more options, visit https://groups.google.com/groups/opt_out.