代码如下:
# _*_ coding:utf-8 _*_
#xiaohei.python.seo.call.me:)
#win+python2.7.x
id_ = 1
f = open('clubpop%s.xml' % id_, 'w')
for i, line in enumerate(open('suk.csv')):
if i % 50000==0:
print i
f.write(' \n \n')
f.write('''
http://HdhCmsTestreview/%s-1-1.html
''' % line.rstrip())
if i % 50000==49999:
f.write(' ')
f.close()
id_ += 1
f = open('clubpop%s.xml' % id_, 'w')
f.write(' ')
f.close()
查看更多关于ptyhon实现sitemap生成示例的详细内容...
声明:本文来自网络,不代表【好得很程序员自学网】立场,转载请注明出处:http://www.haodehen.cn/did87518