0

I am building a facebook messenger bot that scrapes a web page for occurrences of a phrase and notifies users if there are any occurrences. I used JavaScript, NodeJS and Heroku to build a basic facebook messenger bot that echoes messages it receives back to the sender. I want to use Beautiful Soup for the web scraping part.

Is it possible to use Node for the bot, and then use Python just for the scraping part? If so, how would I join the two?

L. Cau
  • 11
  • 2

1 Answers1

0

As you have already built the echo bot, you would know that the end string which you need is stored in some variable. Now all you need to do is write a python script with a fucnction that takes that variable as paramater and do whatever you wish to do. You can call this script by using child_process. Here is the link to how to pass data from node.js to python script and vice versa. How to call Python function from NodeJS

Community
  • 1
  • 1
Arbaz Siddiqui
  • 441
  • 2
  • 10