我正在使用Apify Phanton 爬虫。在 PageFunction 内部,我想访问 Apify SDK,您可以使用其他Apify Cheerio-scraper和Apify puppeteer-scraper 来完成。
我注意到 PhantonJS 爬虫上下文确实公开了 Apify 对象,而其他对象则公开了。
一种可能的解决方案是在 pageFunction 中注入 jquery并使用Apify web API。
我正在使用Apify Phanton 爬虫。在 PageFunction 内部,我想访问 Apify SDK,您可以使用其他Apify Cheerio-scraper和Apify puppeteer-scraper 来完成。
我注意到 PhantonJS 爬虫上下文确实公开了 Apify 对象,而其他对象则公开了。
一种可能的解决方案是在 pageFunction 中注入 jquery并使用Apify web API。