环境python3
str = "西游记 064集"
# 获取064
#方式1
chapter_num = filter(str.isdigit, index_title)
# filter类型 <filter object at 0x10ac49898>
chapter = list(chapter)
# list类型 ['0', '6', '4']
chapter = "".join(chapter)
# str类型 064
#方式2(推荐,便捷)
chapter_num = re.sub("\D", "", index_title)
# str类型 064
#方式3
chapter_num = re.findall(r'\d+', index_title)
# list类型 ['064']
chapter = "".join(chapter)
# str类型 064