modify scripts
This commit is contained in:
@ -40,16 +40,15 @@ class PornboxSpider(BaseSpider):
|
|||||||
def __init__(self, debug='false', cmd='', update='0', *args, **kwargs):
|
def __init__(self, debug='false', cmd='', update='0', *args, **kwargs):
|
||||||
super().__init__(*args, **kwargs)
|
super().__init__(*args, **kwargs)
|
||||||
self.debug = True if (str(debug).lower() == 'true' or str(debug).lower() == '1') else False
|
self.debug = True if (str(debug).lower() == 'true' or str(debug).lower() == '1') else False
|
||||||
self.cmd_str = cmd
|
|
||||||
self.update = int(update)
|
self.update = int(update)
|
||||||
self.logger.info(f"debug mod: {self.debug}, cmd: {self.cmd_str}, update: {self.update}")
|
self.logger.info(f"debug mod: {self.debug}, cmd: {cmd}, update: {self.update}")
|
||||||
|
|
||||||
self.cmd_studio = 'studio'
|
self.cmd_studio = 'studio'
|
||||||
self.cmd_movie = 'movies'
|
self.cmd_movie = 'movies'
|
||||||
self.cmd_actors = 'actors'
|
self.cmd_actors = 'actors'
|
||||||
self.cmd_list = self.cmd_str.split(',')
|
self.cmd_list = [self.cmd_studio, self.cmd_movie, self.cmd_actors]
|
||||||
if len(self.cmd_list) == 0 :
|
if cmd and cmd != '' :
|
||||||
self.cmd_list = [self.cmd_studio, self.cmd_movie, self.cmd_actors]
|
self.cmd_list = cmd.split(',')
|
||||||
|
|
||||||
# 入口函数,由基类的方法触发
|
# 入口函数,由基类的方法触发
|
||||||
def custom_start_requests(self):
|
def custom_start_requests(self):
|
||||||
|
|||||||
Reference in New Issue
Block a user