芒果筛选.py 935 B

123456789101112131415161718192021222324252627282930
  1. #!/usr/bin/env python3
  2. # -*- coding: utf-8 -*-
  3. # File : 芒果筛选.py
  4. # Author: DaShenHan&道长-----先苦后甜,任凭晚风拂柳颜------
  5. # Date : 2022/9/25
  6. cates = '2&3&1&50&51&115'.split('&')
  7. fl_dict = {}
  8. for cate in cates:
  9. fls = []
  10. fls.append({
  11. 'key':'chargeInfo',
  12. 'name':'付费类型',
  13. 'value':[{'n':'全部','v':'all'},{'n':'免费','v':'b1'},{'n':'vip','v':'b2'},{'n':'VIP用券','v':'b3'},{'n':'付费点播','v':'b4'}],
  14. })
  15. fls.append({
  16. 'key': 'sort',
  17. 'name': '排序',
  18. 'value': [{'n': '最新', 'v': 'c1'}, {'n': '最热', 'v': 'c2'}, {'n': '知乎高分', 'v': 'c4'}],
  19. })
  20. year_value = [{'n': str(2022-i), 'v': str(2022-i)} for i in range(19)]
  21. year_value = [{'n': '全部', 'v': 'all'}]+year_value
  22. fls.append({
  23. 'key': 'year',
  24. 'name': '年代',
  25. 'value': year_value,
  26. })
  27. fl_dict[cate] = fls
  28. print(fl_dict)