【发布时间】:2016-05-29 22:20:03
【问题描述】:
我得到的内容与页面上显示的查看源完全不同:
import requests
from bs4 import BeautifulSoup
URL = "http://www.indeed.com/jobs?q=python&start=740"
r = requests.get(URL)
content = r.content
soup = BeautifulSoup(content)
"Apply with" in content
for span in spans:
try:
if "Apply" in span.string:
print(span.string)
except:
pass
span 中没有“Apply”,页面上也没有“Apply with”。我可以确定我想要的唯一方法是“应用”部分
【问题讨论】:
标签: python html python-2.7 python-requests