Skip to content

crawling.py error #1

@K-Minsu

Description

@K-Minsu

Traceback (most recent call last):
File "./crawler.py", line 82, in
data = CrawlingByField_wevity(field=2)
File "./crawler.py", line 68, in CrawlingByField_wevity
result["title"].append(RemoveWords(["SPECIAL" , "IDEA"] , title.text.encode('utf8')).rstrip())
File "./crawler.py", line 9, in RemoveWords
return re.sub('|'.join(wordlist) , '' , string)
File "/usr/lib/python3.6/re.py", line 191, in sub
return _compile(pattern, flags).sub(repl, string, count)
TypeError: cannot use a string pattern on a bytes-like object

영우님이 작성하신 crawling.py 에서 위와 같은 오류가 발생합니다.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions