GithubHelp home page GithubHelp logo

Comments (4)

kangvcar avatar kangvcar commented on June 1, 2024

求助 抓取日历表格中的数据,因为抓取的是 日历控件,里面的数据都是动态生成的。

怎么搞都不出来,特求助您。

网址:https://www.jisilu.cn/data/calendar/

url='https://www.jisilu.cn/data/calendar/'

driver = webdriver.Chrome()

driver.get(url)

强制等待

time.sleep(1)

html = driver.page_source

driver.quit()

soup = BeautifulSoup(html, 'lxml') # lxml为解析器

varStr = soup.find(id='calendar')

trs= varStr.find_all('tr')

用chrome 开发者工具看看network能不能找到api

from awsomespider.

kangvcar avatar kangvcar commented on June 1, 2024

20200328000713.png

from awsomespider.

kangvcar avatar kangvcar commented on June 1, 2024

https://www.jisilu.cn/data/calendar/get_calendar_data/?qtype=newbond_onlist&start=1583078400&end=1586707200&_=1585325017186

from awsomespider.

kangvcar avatar kangvcar commented on June 1, 2024

这些数据是用ajax返回的,分析一下url的构造,就能获取你要的信息。

希望能对你有帮助!@runrun88

from awsomespider.

Related Issues (1)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.