gen_vod.py 568 B

123456789101112131415161718
  1. #!/usr/bin/env python3
  2. # -*- coding: utf-8 -*-
  3. # File : gen_vod.py
  4. # Author: DaShenHan&道长-----先苦后甜,任凭晚风拂柳颜------
  5. # Author's Blog: https://blog.csdn.net/qq_32394351
  6. # Date : 2024/1/7
  7. import importlib
  8. class Vod:
  9. def __init__(self, api, query_params, t4_api=None):
  10. self.api = api
  11. self.module_url = "t4.spiders." + api
  12. self.module = self.import_module(self.module_url).Spider(query_params=query_params, t4_api=t4_api)
  13. def import_module(self, module_url):
  14. return importlib.import_module(module_url)