示例#1
0
文件: base.py 项目: Scaurus/grab
 def get_name(self):
     if hasattr(self, 'spider_name'):
         return self.spider_name
     else:
         return camel_case_to_underscore(self.__class__.__name__)
示例#2
0
文件: base.py 项目: Scaurus/grab
 def get_spider_name(cls):
     if hasattr(cls, 'spider_name'):
         return cls.spider_name
     else:
         return camel_case_to_underscore(cls.__name__)
示例#3
0
 def get_spider_name(cls):
     if cls.spider_name:
         return cls.spider_name
     else:
         return camel_case_to_underscore(cls.__name__)
示例#4
0
文件: base.py 项目: enchantner/grab
 def get_spider_name(cls):
     if hasattr(cls, 'spider_name'):
         return cls.spider_name
     else:
         return camel_case_to_underscore(cls.__name__)
示例#5
0
文件: base.py 项目: enchantner/grab
 def get_name(self):
     if hasattr(self, 'spider_name'):
         return name
     else:
         return camel_case_to_underscore(self.__class__.__name__)
示例#6
0
def make_class_abbr(name):
    val = camel_case_to_underscore(name)
    return val.replace('_', '-')
示例#7
0
文件: base.py 项目: lorien/grab
 def get_spider_name(cls):
     if cls.spider_name:
         return cls.spider_name
     else:
         return camel_case_to_underscore(cls.__name__)