Did you try to print the website addresses (after using .strip())?
That way you can make sure the addresses are valid urls.
Maybe encoding argument should be added to open?
That way you can make sure the addresses are valid urls.
Maybe encoding argument should be added to open?