Skip to content
TheChatArchiveThe Chat Archive
gpt-3.5-turbo-0613· OpenAIAi2 WildChat-4.8M (AI2)

search = re.search('[^\s]' + q + '[^\s]', site.title) try: search.group(0)…

  1. User

    search = re.search('[^\s]' + q + '[^\s]', site.title) try: search.group(0) print(site.title) results.append(site.title) выдает 'NoneType' object has no attribute 'group'

  2. Assistant

    "NoneType" object has no attribute "group" means that the search pattern did not find a match in the given string. In this case, the variable search is None because the regular expression pattern did not find any matches in site.title.

    You may need to adjust your regular expression pattern to match the desired substrings in site.title.