Saturday, 13 January 2018

StockReader: Re-implement in Python

One of my first larger software projects was StockReader. That is a C++ web scraper for stocks.

The final result of StockReader
Now, I need to re-implement the program for four reasons: 
  1. My firewall doesn't like blocks executables that sends several get requests
  2. The source code is horrible and needs to be refactored completely in order to be more maintainable
  3. I should be able to use regular expressions.
  4. The program should be more automatic, selecting stocks automatically
I will not publish the program on Github, but I'll post some issues that I will discuss.

The first step will be to implement a script that gets a web page from an URL. From that html code, I'll extract the URLs for the key number sections for the stocks.

When creating code, it is crucial to understand what one is writing. It is important to resist the temptation to copy some code from stackoverflow and instead focus on really understand what one is writing.

In the Python documentation, there is a section about regular expressions.

No comments:

Post a Comment