import glob,os skip = [ '2020login/', 'js/', 'images/', 'node_modules/', 'wp-includes/', 'img/', 'tmp_/', 'wp4.8.3en/', '__crontab__/', 'Mobile-Detect/', '2019chris_/', 'fonts/', 'css/', 'fe/', 'wp-admin/', 'health/', 'wp-content/', '__datascitw_logs__cannotaccess_me/', 'placeholder/', ]; b = True for v in glob.glob('*/'): if v in skip: continue; if not os.path.exists(v+'index.html'): b = False print v, ' MUST put index.html' x = '' with open(v+'index.html') as f: x = f.read() if 'G-41LSVESCEG' not in x: print v, ' MUST embed GA' if b: print 'ALL deployed successfully'