gpt-3.5-turbo-0613· OpenAI
WildChat-4.8M (AI2)
search = re.search('[^\s]' + q + '[^\s]', site.title) try: search.group(0)…
- 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'
- 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
searchisNonebecause the regular expression pattern did not find any matches insite.title.You may need to adjust your regular expression pattern to match the desired substrings in
site.title.