【发布时间】:2018-09-08 01:22:14
【问题描述】:
我使用BeautifulSoup 在python 中编写了使用HTML 源代码的代码。 我得到的 HTML 非常混乱。如何使 HTML 源代码看起来不错?
这是website
这就是我获取 html 源代码(其中一部分)的方式:
property="article:tag" content="ally" /><meta
property="article:tag" content="harvey weinstein" /><meta
property="article:tag" content="pratiksha parulekar" /><meta
property="article:tag" content="rape culture" /><meta
property="article:section" content="No Photo" /><meta
property="article:published_time" content="2017-10-25T22:28:46-05:00" /><meta
property="article:modified_time" content="2017-10-25T22:44:29-05:00" /><meta
property="og:updated_time" content="2017-10-25T22:44:29-05:00" /><meta
name="twitter:card" content="summary" /><meta
name="twitter:description" content="For men, professing disgust at sexual assault allegations is not sufficient; male allies must also hold friends who harass women accountable." /><meta
name="twitter:title" content="To combat sexual harassment, men must hold peers accountable • The Tulane Hullabaloo" /><link
rel='dns-prefetch' href='//cdn.jsdelivr.net' /><link
rel='dns-prefetch' href='//maxcdn.bootstrapcdn.com' /><link
rel='dns-prefetch' href='//fonts.googleapis.com' /><link
rel='dns-prefetch' href='//s.w.org' /><link
我能做什么?
【问题讨论】:
-
“美在旁观者眼中”。 “看起来不错”是什么意思?我真的不认为这是一个编程问题。
-
查看我添加的 html 源代码。打开标签位于末尾。 @s
标签: python beautifulsoup