‘Buy the rumor, sell the news’ is a popular saying in stock market where the stocks rise in anticipation of some major news and then stabilize or fall down after the news is announced — one example is the Apple’s stock split. This is even more significant in cryptocurrency market where the trading is so volatile that a rumor or news can make its value jump up or plummet down by 50%.

I’ve been a close follower of the cryptocurrency market and observed that developments in projects like mainnet release, staking, and token burn make the coin pump significantly. For eg, if a coin ‘X’ is rumored to release some news related to their mainnet three weeks from now, most of the whales buy the rumor and when the official news hits they sell their bag.

Coinmarketcal — It’s a website which lists the probable upcoming events for various coins, it gets updated multiple times in a single day so tracking various projects becomes difficult, what I have done is scrap the content via Selenium web driver using Python, schedule a task to run every 1 hour and mail me an alert if there is anything significant.

Prerequisites — Download the chrome driver from here**, **make sure you have Google Chrome browser and selenium package installed.

The objective is to select the ‘Next 30 days’ text from the date box list, select the required exchanges from the Exchanges All drop down, click on search icon and scrap all the events which come up. I’ll be talking about the following things in a two part series:

· Launching a website through web driver

· Selecting an option from a drop down

· Entering text, clearing it and re-entering a new text in a search box

· Clicking on icon/button

. Scraping the required text

· Navigating through different pages

. Static wait, Dynamic wait and Exception handling

· Storing the scraped data in a csv file

· Creating a task scheduler to run the script every 1 hour and email the csv file

#automation #selenium #web-scraping #cryptocurrency #python

Web Scraping Made Simple using Selenium Web Driver and Python
5.75 GEEK