作者:
nomind (Take it easy)
2016-02-23 19:43:01想要抓的資料是 http://store.hp.com/us/en/cat/Laptops
Shop Now 所有連出去的連結
寫過其他的爬蟲程式,底下的方法都可以用,不知道為什麼這個網站抓不到想到的資料
homePage = requests.get("http://store.hp.com/us/en/cat/Laptops")
homeSoup = BeautifulSoup(homePage.text.encode("utf-8"),"html.parser")
for data in homeSoup.find_all('a',{"class":"details"}):
print(data.get("href"))
麻煩大家幫忙解惑,謝謝