Code: Alles auswählen
import urllib, os
d = open("textfile.txt","w");
x = os.path.getsize("textfile.txt");
while (x <= "10000L"):
f = urllib.urlopen("URL");
for content in f:
if content == "Contentinhalt":
d.write(content + "\n")
f.close();
Code: Alles auswählen
import urllib, os
d = open("textfile.txt","w");
x = os.path.getsize("textfile.txt");
while (x <= "10000L"):
f = urllib.urlopen("URL");
for content in f:
if content == "Contentinhalt":
d.write(content + "\n")
f.close();
Code: Alles auswählen
with open("links.txt", "w") as linkfile:
while True:
links = gather_links(url)
linkfile.writelines(links)
if os.path.getsize >= MAX_SIZE:
break