Skip to content

elizabethsiegle/parse-html-for-top-goodreads-quotes-with-twilio-whatsapp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

This is an application that uses the Twilio API for WhatsApp, Beautiful Soup, and Python 3 to parse the Goodreads quotes webpage.

To Run the Application

You will need a few things to run this application.

Prepare this Application

At the moment, only approved business accounts can use Twilio's WhatsApp API so we need to go on over to the Twilio WhatsApp Sandbox in our Twilio console. To activate it we must choose a Sandbox number, agree to the terms of WhatsApp, and select Activate Sandbox. Twilio WhatsApp Sandbox

To join a Sandbox, send “join ” to your Sandbox number in WhatsApp and you should get a response confirming you’ve joined. You can follow these instructions to install the WhatsApp Sandbox Channel in your account and connect your WhatsApp account with the Sandbox.

Next, clone this application, cd into the directory and install the necessary libraries and modules with pip3.

git clone https://github.com/elizabethsiegle/parse-html-for-top-goodreads-quotes-with-sms 
cd parse-html-for-top-goodreads-quotes-with-sms
pip3 install requests twilio flask string bs4 random 

If this throws permission errors run pip3 install --user [package].

On the command line in that directory run

python goodreads.py

and then open up a new terminal tab, get to the directory with your code, and run

ngrok http 5000

Make sure you configure your Twilio phone number configured with that public-facing URL as shown in this handy tutorial and pass it to your WhatsApp number as shown below.

Tada! You're now all set to build the rest of the app and should be able to send messages that look like this. Example WhatsApp message

About

Parse HTML of Goodreads quotes page with Twilio's WhatsAPP API https://www.twilio.com/whatsapp/api

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages