/mail_my_stocks

This is my first project after learning Web Scrapping; libraries like Requests, BeautifulSoup, Requests-HTML, Selenium and SMTPLIB(Library for sending mails). I've tried to integrate all of these libraries in the project.

Primary LanguagePythonGNU General Public License v3.0GPL-3.0

Mail My Stocks

This script scrapes the information of stocks you own through MeroShare and scrapes the live information of those stocks from (http://nepalstock.com/todaysprice) and mails the information of the stocks from desired email to desired email.

This script can be scheduled with Windows Scheduler or in Linux to automatically run the script everyday after the market closes or as required.

How to use the script?

1. Install the required dependencies

pip install -r requirements.txt 
or 
python3 -m pip install -r requirements.txt 

2. Edit the meroshareCredentials.txt file and add your meroshare credentials as mentioned there

username=MeroshareUsername
password=MerosharePassword
dpNumber=dpNumber

3. Edit the emailCredentials.txt file and add your email credentials as mentioned there

sender_email=email
sender_password =App-password
recipient_email=email

Note: Google no longer accepts password directly through SMTPLIB as it is considered as insecure. But you can use App-Passwords to access gmail. Learn how to do this through here

4. After adding credentials and email credentials run the following command from parent directory

python ./my_stocks.py
or
python3 ./my_stocks.py

I don't consider this project complete yet. I'll add more features as I get ideas on what to add.