This also incorporates synfonaut's API call to automatically query for magic numbers from https://pow.market/unmined
Code is commented to explain further.
Check out this thread for reference: https://twitter.com/deanmlittle/status/1233895896644898816
Clone Dean's repository per his git: https://github.com/deanmlittle/21e8miner
Once cloned the Git repository into a local directory, run the following steps instead of the ones on GitHub:
Let me know of any questions. Leave them in the comments here or reach out to me on Twetch or Twitter.