diff --git a/WebCrawler/madou.py b/WebCrawler/madou.py index 9dc7773..be0f5b1 100644 --- a/WebCrawler/madou.py +++ b/WebCrawler/madou.py @@ -16,12 +16,10 @@ def getActorPhoto(html): def getTitle(html, number): # 获取标题 - title = str(html.xpath('//h1[@class="article-title"]/text()')[0]) - try: - result = str(re.split(r'[/|/|-]', title)[1]) - return result.strip() - except: - return title.replace(number.upper(), '').strip() + #