from .tool.func import * def api_sitemap_2(conn): curs = conn.cursor() if admin_check() == 1: data = '' + \ '\n' + \ '\n' + \ '' curs.execute(db_change("select title from data")) for i in curs.fetchall(): data += '' + flask.request.host_url + 'w/' + url_pas(i[0]) + '\n' data += '' + \ '' + \ '' f = open("sitemap.xml", 'w') f.write(data) f.close() return flask.Response(data, mimetype = 'text/xml') else: return re_error('/ban')