Python爬虫学习(单线程爬虫(二))

这里要注意到网页异步加载的问题,在代码中切换page,可得到不同公司的信息

import requests
import re
url = 'https://www.crowdfunder.com/browse/deals&template=false'

# html = requests.get(url).text
# print html

data = {
    'entities_only':'true',
    'page':'2'
}
html_post = requests.post(url,data = data)
title = re.findall('"card-title">(.*?)
',html_post.text,re.S) for each in title: print each

你可能感兴趣的:(Python学习)