Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(3)  |  Call(3)  |  Derive(0)  |  Import(0)

src/b/n/bnw-HEAD/bnw/web/site.py   bnw(Download)
        f = [("date", -1)]
        skip = 0
        self.write('<?xml version="1.0" encoding="UTF-8"?>\n<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">\n\n')
        while True:
            messages = list((yield objs.Message.find_sort({}, sort=f, fields={'id':1}, limit=20, skip=skip)))
            for message in messages:
                self.write('<url><loc>http://%s/p/%s</loc><priority>1.0</priority></url>\n' % (bnw.core.base.config.webui_base, message['id']))
                break
            skip += 20
        self.write('</urlset>\n')
        defer.returnValue('')