code: def parse_class_id(self, sel, m, has_selector):
          
  
          selector = m.group(0)
          if selector.startswith('.'):
              sel.classes.append(css_unescape(selector[1:]))
          else:
              sel.ids.append(css_unescape(selector[1:]))
          has_selector = True
          return has_selector
docs: Parse HTML classes and ids.