Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # OK ash so here is a 'template' so to speak oh a file that you can play with.
- sitemap = ['www.google.com', 'www.apple.com', 'www.yahoo.com', 'www.gosijsogspdogjsibgisug.com']
- # Any line with a hash in front is a comment so it won't actually do anything btw, so there is your list of urls
- def get_urls_from_sitemap(sitemap):
- # This is a blank function, eventually will need to contain code to extract a list of strings from a sitemap.xml
- # For we'll just return whatever is passed in
- return urls
- def check_url(url):
- #This is a blank function that eventually will need to check the url and return whether it's ok or not
- # For now I'll return True, even if url is bad
- return True
- # Program code goes below
- urls = get_urls_from_sitemap(sitemap)
- for url in urls:
- # This is where we'd need to check each url
- # We're going to set a variable called 'is_url_ok' to the result of the 'check_url()' function defined above, it will always be true until code is written
- is_url_ok = check_url(url)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement