Skip to content

Instantly share code, notes, and snippets.

@johndavidsimmons
Created February 1, 2017 16:09
Show Gist options
  • Select an option

  • Save johndavidsimmons/e0d016729c289b518ced4a7a57d0f810 to your computer and use it in GitHub Desktop.

Select an option

Save johndavidsimmons/e0d016729c289b518ced4a7a57d0f810 to your computer and use it in GitHub Desktop.
The main function for checking Adobe Analytics
def main():
global target_url
global HTML_string
global driver
relative_anchors = findAllAnchors(target_url)
# Iterate the relative anchors and collect data
for anchor in relative_anchors:
anchorHref = str(anchor['href'])
visitPage(target_url, anchorHref)
# Append the closing html
HTML_string += '''</table></body></html>'''
# Write the HTML to a file
HTML_file= open("ex.html","w")
HTML_file.write(HTML_string)
HTML_file.close()
driver.close()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment