Register
Login
Resources
Docs Blog Datasets Glossary Case Studies Tutorials & Webinars
Product
Data Engine LLMs Platform Enterprise
Pricing Explore
Connect to our Discord channel

README.md 952 B

You have to be logged in to leave a comment. Sign In

googletrendsapi

The simple script to crawl google trends api using input keywords then writting results to GQB. Using Google Cloud Functions, Pub/Sub and google scheduler to crawl at specific interval. Step 1: Clone this repo/create similar folder in Google cloudshellStep 2: Modify infomation inside [] with your proper project/dataset/tableStep 3: Install packages in requirements.txt. Run command: "pip3 install -r requirements.txt" Step 4: deploy cloud function on pub/sub: gcloud functions deploy [FUNCTION_NAME] --entry-point main --runtime python37 --trigger-resource [TOPIC_NAME] --trigger-event google.pubsub.topic.publish --timeout 540s Step 5: Deploy cron job in google cloudshellgcloud scheduler jobs create pubsub [JOB_NAME] --schedule [SCHEDULE] --topic [TOPIC_NAME] --message-body [MESSAGE_BODY]Reference: https://cloud.google.com/blog/products/application-development/how-to-schedule-a-recurring-python-script-on-gcp

Tip!

Press p or to see the previous file or, n or to see the next file

Comments

Loading...