Last active
April 3, 2018 04:43
-
-
Save JichunMa/21e8f36d5cd0e11df90afc527e8a669e to your computer and use it in GitHub Desktop.
头条详情页图片url
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
detail_data = '' | |
// 详情页网址 https://www.toutiao.com/a6539663078324175367/ | |
//我把头条详情页存到了本地 toutiao_detai.html | |
with open('toutiao_detai.html', 'r')as f: | |
detail_data = f.read() | |
data_list = re.findall("articleInfo: {(.*?)}", detail_data, re.S) | |
for data in data_list: | |
url_list = re.findall('(http.*?com)', text, re.S) | |
for url in url_list: | |
print(url) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment