I'm working with scrapy 1.1 . After extracting entities I get a string that looks like:
bob jones | acme, inc | jeff roberts |company, llc
I want to get a list of all the companies, so I tried:
company_types = ['inc','llc','corp']
entities = str(item.get('entities')).lower
entity_list = entities.split('|')
company_list= [a in entity_list if any(company_types) in a]
I'm getting:
company_list= [a for a in entity_list if any(company_types) in a]
TypeError: 'in <string>' requires string as left operand, not bool
What am I doing wrong?