Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save cloudjumper2000/a4a85970580f7431ba1e55b487ce61b1 to your computer and use it in GitHub Desktop.
Save cloudjumper2000/a4a85970580f7431ba1e55b487ce61b1 to your computer and use it in GitHub Desktop.
Write header Repeating
#!/usr/bin/python -tt
from bs4 import BeautifulSoup
import urllib.request
import time
from time import sleep
from random import randint
#import urlparse
timestr = time.strftime("%m-%d-%Y_%H_%M_%S")
# inlinetime = time.strftime("%-m/%d/%Y")
inlinetime = time.strftime('%m/%d/%Y').lstrip("0").replace(" 0", " ")
timestrfolder = time.strftime("%m-%d-%Y")
file = open('/exp_list100_' + timestr + '.html', encoding='utf-8', mode='a+')
with open('/exp_list100_' + timestr + '.html', encoding='utf-8', mode='a+') as file_1, open('/pages/header.html', 'r') as file_2:
for line in file_2:
file_1.write(line)
print('Write Header.html')
sleep(1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment