You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#给 h1 tag 设置居中属性
body.find('h1')['style'] = "text-align:center;"
这时候要用
body = soup.find(class_="article-intro")
#body = soup.find_all(class_="article-intro") #如果用find_all 那后面就要用 html = h[1:-1] 去掐头去尾 去掉 [ 和 ]
The text was updated successfully, but these errors were encountered:
pendave
changed the title
给hi标签设置居中 body.find('h1')['style'] = "text-align:center;"
给h1标签设置居中 body.find('h1')['style'] = "text-align:center;"
May 25, 2017
这时候要用
The text was updated successfully, but these errors were encountered: