我正在尝试使用firebase云功能来构建一个价格跟踪器,以便从网页中跟踪
假设我想跟踪这个产品:https://www.jarir.com/sa-en/apple-magic-keyboard-mouse-combo-547294.html
const中作为html或字符串?下面是我使用pubsub每30分钟触发一次这个事件:
import * as functions from 'firebase-functions';
import admin = require('firebase-admin');
export const priceTracker = functions.pubsub.schedule('every 30 minutes')
.onRun(async(context) => {
// 1- How to load this page: https://www.jarir.com/sa-en/apple-magic-keyboard-mouse-combo-547294.html
// and save it in a `const` as an html or string
// 2- How to extract the price from the html const and save the result into my firestore database
});提前感谢
发布于 2020-06-06 14:12:58
这确实是一个宽泛的话题,在堆栈溢出的答案中很难完全回答。相反,我要做的是帮助您将其分解为更小的步骤,并为这些步骤提供链接。
在所有这些方面,真正有助于认识到:
考虑到这一点:
https://stackoverflow.com/questions/62232711
复制相似问题