Comments (4)
求助 抓取日历表格中的数据,因为抓取的是 日历控件,里面的数据都是动态生成的。
怎么搞都不出来,特求助您。
网址: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.
from awsomespider.
from awsomespider.
这些数据是用ajax返回的,分析一下url的构造,就能获取你要的信息。
- 休市信息:https://www.jisilu.cn/data/calendar/get_calendar_data/?qtype=OTHER&start=1583078400&end=1586707200&_=1585325017184
- 新债信息:https://www.jisilu.cn/data/calendar/get_calendar_data/?qtype=newbond_onlist&start=1583078400&end=1586707200&_=1585325017186
- 新股信息:https://www.jisilu.cn/data/calendar/get_calendar_data/?qtype=newstock_apply&start=1583078400&end=1586707200&_=1585325017179
- 分红信息:https://www.jisilu.cn/data/calendar/get_calendar_data/?qtype=diva&start=1583078400&end=1586707200&_=1585325017187
希望能对你有帮助!@runrun88
from awsomespider.
Related Issues (1)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from awsomespider.