荐片筛选.py 892 B

1234567891011121314151617181920212223242526272829
  1. #!/usr/bin/env python3
  2. # -*- coding: utf-8 -*-
  3. # File : 荐片筛选.py
  4. # Author: DaShenHan&道长-----先苦后甜,任凭晚风拂柳颜------
  5. # Date : 2022/10/22
  6. def getFilters():
  7. fyyear = '全部&2022&2021&2020&2019&2018&2017&2016'.split('&')
  8. fyyeark = '0&101&118&16&7&2&3&22'.split('&')
  9. fysort = '热门&评分&更新'.split('&')
  10. fysortK = 'hot&rating&update'.split('&')
  11. fyclass='0&1&2&3&4'
  12. fy_dict = {}
  13. for i in fyclass.split('&'):
  14. fy_dict[i] = [{
  15. 'key': 'year',
  16. 'name': '年代',
  17. 'value': [{'n':fyyear[j],'v':fyyeark[j]} for j in range(len(fyyear))]
  18. },{
  19. 'key': 'sort',
  20. 'name': '排序',
  21. 'value': [{'n':fysort[k],'v':fysortK[k]} for k in range(len(fysort))]
  22. }]
  23. print(fy_dict)
  24. if __name__ == '__main__':
  25. getFilters()