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 我这样写为啥没有打印呢?
添加回答
举报
0/150
提交
取消