Created
August 6, 2021 20:07
-
-
Save yanissi/5e19136d056a91042fce1b574f570687 to your computer and use it in GitHub Desktop.
This file contains 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
# Identify Unique Broken Links and Matches them to Original List of All External Links | |
def matchBrokenLinks(brokenLinksList,externalLinksListRaw): | |
brokenLinkLocation = [] | |
for link in externalLinksListRaw: | |
if link[1] in brokenLinksList: | |
brokenLinkLocation.append([link[0],link[1],link[2]]) | |
else: | |
pass | |
dataframeFinal = pd.DataFrame(brokenLinkLocation,columns=["URL","Broken Link URL","Anchor Text"]) | |
return dataframeFinal |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment