def is_valid_url(url_parsed):
  # Make sure the the domain and path pass the
  # check.
  found = True

  if app.debug:
    print 'Domain: %s' % url_parsed.netloc
    print 'Domain regex: %s' % domain_regex.pattern
    print 'Domain not match: %s' % (domain_regex.match(url_parsed.netloc) is not None)
    print 'Path: %s' % url_parsed.path
    print 'Path regex: %s' % path_regex.pattern
    print 'Path not match: %s' % (path_regex.match(url_parsed.path) is None)

  # Check domain
  domain_match = domain_regex.match(url_parsed.netloc)
  if domain_match is None:
    found = False

  # Check path
  if found:
    path_match = path_regex.match(url_parsed.path)
    if path_match is None:
      found = False

  return found;


# Start Flask App
dataset/ETHPy150Open MinnPost/jsonproxy/app.py/is_valid_url/operator `is` -> `is not`