Update url_handling.py

More pythonic 'x in set(a,b)' rather than 'x == a or x == b'.