读取txt文件,并写入列表
import os
classes_path = os.path.expanduser('列表')
with open(classes_path, 'r', encoding='UTF-8') as f:
class_names = f.readlines()
class_names = [c.strip().replace('https://www.facebook.com/', '') for c in class_names]
print(f'keyword_list={class_names}')