当我运行命令时:
for row1 in soup.find_all('p',class_ = " cons mainText truncateThis wrapToggleStr"):
print row1
输出:
当我运行命令时:
^{pr2}$输出:
At Hyderabad, IDC you have to stay late most of the time if you have to get work done on time....
No growthMostly Verification workNot so good top management
我想要这样:
At Hyderabad, IDC you have to stay late most of the time if you have to get work done on time....
No growth
Mostly Verification work
Not so good top management
请帮我用beauthoulsoup得到我想要的输出。在
你可以试试这个:
输出:
详细信息:
^{pr2}$row1[1].contents
将为您提供:然后可以使用条件
getattr(x, 'name', None) != 'br'
过滤出文本:相关问题 更多 >
编程相关推荐