抓取无限滚动的网站

时间:2016-11-26 07:32:53

标签: python web-crawler

我试图抓取flipkart,但是flipkart不会立即加载其页面。所以我无法抓取它。请帮忙。

from bs4 import BeautifulSoup
import requests
import re
import MySQLdb
import urllib2
import urllib

url = "https://www.flipkart.com/offers-list/weekend-specials?screen=dynamic&pk=contentTheme%3DLS-Nov-Weekend_widgetType%3DdealCard&wid=4.dealCard.OMU&otracker=hp_omu_Weekend+Specials_1"

r = requests.get(url)
soup = BeautifulSoup(r.content,"html.parser")

name=soup.find_all("div",{"class":"iUmrbN"})
for i in name:
    print i.text

这不是任何输出。

0 个答案:

没有答案