简体   繁体   English

web 使用 node.js 和 puppeteer 从具有挑战性的来源中抓取

[英]web scraping from challenging source with node.js and puppeteer

I would like to web scrape dance center timetable.我想web刮舞蹈中心的时刻表。 At this moment I have almost all required informations apart of start time and duration of classes and I have no idea how to get this data:此时此刻,除了开始时间和课程持续时间之外,我几乎拥有所有必需的信息,但我不知道如何获取这些数据:

在此处输入图像描述

Directed link: https://loftodance.pl/grafik定向链接: https://loftodance.pl/grafik

I use node.js + puppeteer.我使用 node.js + 木偶师。 Any ideas?有任何想法吗?

Use Chrome Dev Tools.使用 Chrome 开发工具。 Inspect the element.检查元素。

Right-click on the element in Dev Tools > Copy > Copy XPath右键单击开发工具中的元素 > 复制 > 复制 XPath

Then use puppeteer's page.$x()然后使用 puppeteer 的page.$x()

page.$x("//*[@id="scroll-hours-1-1"]/div[5]");

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM