If you want to automate your astrology...this is a simple node.js web scraper that can be invoked from command line. I subscribe to The Power Path monthly horoscope, but I got sick of following the link to the website and manually copy-pasting the part I was interested in every month :P
This project was based on a Scotch.io web scraper example so I could start learning Node.js and jQuery.
Features:
- Date calculation to determine the proper URL
- Traverses the DOM to locate the "Dates and Time Frames" section
- Extracts and formats the data & sends via Mailgun
- Node.js - click here for installation instructions
- Node package manager (npm)
- An SMTP mail server that you have access to (for sending mail) - see below
git clone https://github.com/jfrench206/powerpath/ && npm install
This project uses Mailgun for sending email, because it's way easier than messing with Gmail security.
- Open the credentials.js file (found in your local /powerpath directory) in a text editor.
- Follow this link and click on your domain name (e.g. sandboxXYZ.mailgun.org).
- Select "API" from the screen that follows, and copy the API key. Paste it into the "apiKey" section of the credentials.js file.
- Go back to Mailgun, hit the back button, and select the "SMTP" section. Copy these values: "Username" into credentials.js "from" section...
- ...and the part after the @ sign of "Username" into the credentials.js "domain".
- Finally, enter the same recipient address that you added in step 2 of "Mailgun setup" into the "to" field.
Phew! Now you should be all set. Run the app using
$ node server.js
If all goes well, you should get a confirmation like this:
{ id: '<[email protected]>',
message: 'Queued. Thank you.' }
Woohoo! Next up is to automate the script each month using a cron job or similar. Stay tuned...
- Jesse French - Modification and customization - jfrench206