Skip to content

Commit 64ee758

Browse files
committed
Merge pull request Show-Me-the-Code#77 from dayiguizhen/patch-1
Update 0008.py
2 parents 018d602 + a2b1add commit 64ee758

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

renzongxian/0008/0008.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
def get_body(url):
1717
html_content = urllib.request.urlopen(url).read()
1818
r = re.compile('<p>(?:<.[^>]*>)?(.*?)(?:<.[^>]*>)?</p>')
19-
result = r.findall(html_content.decode('GBK'))
19+
result = r.findall(html_content.decode('GBK').encode('utf-8'))
2020
return result
2121

2222

0 commit comments

Comments
 (0)