domain_name = ["sohu", "sina", "baidu", "lagou", "qichacha", "tianyancha", "qq.com", "163.com", "juzi.com", "36kr", "cyzone", "qixin", "kanzhun", "liepin", "zhihu", "weibo", "apple", "zhaopin", "baike"]def filter_url(url): for domain in domain_name: if domain in url: return if filter_url("xy2.netease.com/thread"): print("xy2.netease.com/thread") 就是一任何一个domain_name的字符在传入的url 中出现就pass 如果没有 就打印这url 我这样写为啥没有打印呢?
德玛西亚99
相关分类