I am lazy and do not really have time to check on every website the exchange rate for the Malagasy Ariary (MGA) currency before sending funds back home. Hence, I started working on this small project on one weekend.
Basically, the idea is: to know the price of the Ariary currency from different platforms.
- Check the rate on the following websites: XE, BOA Madagasikara, WorldRemit, and TapTapSend
- Format the result of the search
- Push that result to the Telegram API
- Publish the result to the Telegram channel
General overview of the infra
- Programming languages:
- Python: automation and web scraping
- Bash: to run a process in Linux as a cron job
- Infrastructure: AWS EC2 running on AWS Lightsail
- OS: CentOS 9 Stream server
- Webhook/messaging: Telegram API
Browser simulation for user interaction
Currently, I am using Selenium Webdriver. Basically, WebDriver drives a browser natively, as a user would, either locally or on a remote machine using the Selenium server, which marks a leap forward in terms of browser automation. I decided to implement this because simple http POST requests
to websites are failing due to CAPTCHA (or robot detection) verification.
- Browser: Mozilla Firefox browsers
- Webdriver: geckodriver v0.33.0
- Virtual display on Linux server: xvfb
Push message to Telegram Channel
I am using the Telegram API to push messages to a Telegram channel.
- Telegram channel: Ariary Zato
- Telegram bot: Vola Ariary Bot
Installation details
- Installing Firefox On Centos
- Installing Firefox Geckodriver
- Installing Selenium
- Testing Selenium and Firefox
- xvfb-run