Created
February 1, 2017 16:09
-
-
Save johndavidsimmons/e0d016729c289b518ced4a7a57d0f810 to your computer and use it in GitHub Desktop.
The main function for checking Adobe Analytics
This file contains hidden or 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
| 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