37,720
社区成员
发帖
与我相关
我的任务
分享
<a data-ng-bind-html="doc.headline" data-ng-href="https://www.washingtonpost.com/business/on-small-business/hondajet-sees-china-southeast-asia-demand-spurred-by-efficiency/2018/02/06/1a70e2a4-0b03-11e8-998c-96deb18cca19_story.html" target="_self" data-ng-mousedown="vm.sendData(this)" class="ng-binding" href="https://www.washingtonpost.com/business/on-small-business/hondajet-sees-china-southeast-asia-demand-spurred-by-efficiency/2018/02/06/1a70e2a4-0b03-11e8-998c-96deb18cca19_story.html">HondaJet Sees <strong>China</strong>, Southeast Asia Demand Spurred by Efficiency</a>
# coding=UTF-8
import re
html = '''
<a data-ng-bind-html="doc.headline" data-ng-href="https://www.washingtonpost.com/business/on-small-business/hondajet-sees-china-southeast-asia-demand-spurred-by-efficiency/2018/02/06/1a70e2a4-0b03-11e8-998c-96deb18cca19_story.html" target="_self" data-ng-mousedown="vm.sendData(this)" class="ng-binding" href="https://www.washingtonpost.com/business/on-small-business/hondajet-sees-china-southeast-asia-demand-spurred-by-efficiency/2018/02/06/1a70e2a4-0b03-11e8-998c-96deb18cca19_story.html">HondaJet Sees <strong>China</strong>, Southeast Asia Demand Spurred by Efficiency</a>
'''
pattern=re.compile(r' href="(.*?)"',re.S)
items = re.findall(pattern, html)
for item in items:
print item