Created
September 14, 2018 11:10
-
-
Save justindavies/ebb026bef5bde4ddb8244f619eb8edbb to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for x in range(int(data["block_number"]), 1, -1): | |
line = line + "<url>\n" | |
line = line + "<loc>http://inkl.in/"+str(x)+ "</loc>\n" | |
line = line + "<changefreq>never</changefreq>" | |
line = line + "</url>\n" | |
counter=counter+1 | |
if counter == 50000: | |
counter = 1 | |
print("Writing " + str(filename)) | |
file = open("/mnt/sitemaps/" + str(filename) + ".xml", "w") | |
file.write('<?xml version="1.0" encoding="UTF-8"?>\n') | |
file.write('<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">\n') | |
file.write(line) | |
file.write("</urlset>") | |
file.close() | |
filename = filename + 1 | |
line = "" | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment