I want to get the digit 805 between the html tag using urllib2 from a web page.
<span class="count">(共805张)</span>
Here is the python code I wrote to get the number:
url = "https://movie.douban.com/celebrity/1044996/photos/"
request = urllib2.Request(url,headers=headers)
response = urllib2.urlopen(request)
content = response.read().decode('utf-8')
pattern1 = re.compile(r'<span\sclass="count">(.*?)</', re.S)
result1 = re.search(pattern1, content)
total_num = result1.group(1)
total_num = total_num
But when I print the total_num, the console shows:
u'(\u5171805\u5f20)'
How can I get the number 805 expect using regular expression?