How to scrape and extract data from a webpage. as a case study (Part 1)

Reading up on how Xpath works will enable you understand Part 2


How to unlock your Swift 4G LTE Huawei modem in 7 steps

How to unlock your Swift 4G LTE Huawei modem

1. Note down the IMEI number of the Swift modem
2. Remove the Swift 4G SIM card and replace with a SIM of any other network.
3. Restart the modem.
4. Go to, enter your device IMEI number and click submit to generate 3 unlock codes.
5. Go to A message will be displayed stating that your modem is locked and asking for an unlock code.
6. Enter any of the 3 unlock codes you generated in STEP 4.
7. The modem will now show the network name of the SIM card inserted indicating a successful unlock.


Using Flask with vue.js as a frontend framework

Update: I will be updating this post with my experience using Flask and Vue.js as a frontend framework.

Flask has become my Python framework of choice and I have been trying to use Vue.js as the front-end JS framework for an app with flask powering the backend API.

The only snag is that both Flask and Vue.js both use the double handlebar notation i.e. “{{}}” For variable interpolation in HTML, So using them both in an app could cause some headaches.

After some googling on the issue, I discovered that you could actually do this to make them play well together:

You have 2 options, modify either Flask or Vue.js

In your view file, i.e. the Python controller script, do this:

from flask import Flask, render_template, request

class CustomFlask(Flask):
jinja_options = Flask.jinja_options.copy()

app = CustomFlask(__name__)

def index():
return render_template("index.html")

if __name__ == "__main__":

Or add this to your layout.html template file:

Vue.config.delimiters = ["${", "}"];

and add the custom javascript file holding the Vue instance that will target parts of your DOM to the end of the HTML template file.

I actually prefer changing the Vue.js delimiters than changing Jinja2 delimiters because I am used to using the “{{}}” notation and it will make your old code backward compatible with Vue.js

It works because you subclass the Flask class imported from the flask module and modify it by changing the Jinja delimiters. I made my setup closely mirror “Templator” which is the name of the templating system used in, a small Python web framework written by Aaron Swartz.

If you are a frontend dev, give Vuejs a spin, it has an almost nonexistent learning curve, so give it a trial today.

Quick, dirty hack for hosting websites when you can’t pay your server fees.

On January 1, 2016, the use of Naira denominated debit cards outside Nigeria will officially become impossible and this will have an adverse ripple effect on almost everything you can think of. As a techie, I am very concerned about how I would renew my hosting fees etc.

This is a simple workaround:
You can expose a local server installed on a development machine serving a web application to the world using this simple tool . You can install it on Windows, Mac and Linux.

Exposing a local server to the Internet is as simple as running “ngrok 5000”, where 5000 is the port that the web application server is running from, it could be any valid port number.

Downside: you will be paying loads in bandwidth fees to your local ISP and if your development machine specs isn’t beefy then there is a limit to the number of requests you can server per second.

P.S: I have tried it and it works. I am currently running some simple one page flask apps off my 16gb RAM Linux Mint laptop.
#ShameOnEmefiele #WeRiseStill

Firewall or not: How to read Linda Ikeji blog and other blocked sites in a corporate organization

Me: Forgive me, Father for I have sinned. It’s been 30 days since my last confession. ┬áThese are my sins: I did a “pretty bad thing” today.

Father: Speak my child…

In other news,

Linda Ikeji’s blog, Stella Dimokokorkus,,, are examples of websites that are blocked by organizations to prevent workers from whiling away time on those websites (rightly so).

Sometimes work can get so boring that you actually find watching wet paint dry on a wall more interesting than doing actual work. Till today…

If your corporate network has blocked these websites but allows then you are covered.

1. Go to

2. type the blocked website you wish to visit e.g. in the box to the left

3. Click on the generated link in the box on the right.

4. You would get a message saying the website you are trying to translate is in english

5. Click on the “visit original page” link

6. You would be able to view the blocked website now but without images and javascript disabled.

Me: ****crickets****

Father: huh?

An uber Lagos experience almost from hell.

I hate weddings.

As a rule I never attend weddings, but this was one that I just had to attend. Yet it seemed that the gods, petrol scarcity and my Uber driver were determined I was not going to break my self-imposed rule.

I made a ride request 45+ minutes ago and my Uber driver was nowhere to be found. I called him repeatedly and he always had a glib excuse why he had not arrived.

I guess when he felt I was bugging him too much, he stopped picking my calls and sent me a text:

Am sorry 4 everything bt I jst couldn’t continue av also wasted a lot of fuel trying to locate u n d last thing i want is more misunderstanding after d stress

Observation: The Uber driver didn’t know his way around, blamed the network for not being able to use Google maps and refused to just ask for directions from people around him.

At this point my blood was boiling because I was already very late. So I cancelled the ride request and made another. The driver fortunately was very close so he appeared in no time, I got into the car and told him my destination. What was his response?

I am very sorry, I cannot go that far. I don’t have any petrol.

Huh??? WTF!!! is this Uber?

At this stage I knew that the gods were really angry with me and definitely did not want me going to some owambe wedding on a hot Saturday afternoon.

I decided to try for the third and last time and I was third time lucky. The Uber ride came on time, the driver was very courteous and the journey was uneventful and I was very pleased.

Due to the African time syndrome, I was not as late as I thought I was going to be.

I still hate weddings though.

Foot notes
1. Uber Lagos drivers should be trained on how to navigate Lagos roads even without Google maps. If they don’t have network on their devices, I see no reason why they can’t ask, old fashion style.

2. Uber should do something about determining accurate ETA of uber rides. Right now you really can’t predict when a requested Uber ride would arrive to pick you up. Its way off the displayed ETA in the app.

3. Uber customer service is one of the best I have come across in this clime. After I left my feedback about the previous failed ride requests, Ebi (she deserves a raise) came to the rescue with swift reparation. The standard should be maintained.

Swift 4G LTE unlimited plan and a simple cronjob

As a subscriber to Swift’s unlimited data plan which offers free unlimited Internet access from 12am to 6am and also having a full time day job, I kind of noticed that I wasn’t “milking” the free segment as much as I could because most times I would be asleep during that period.
So I decided to write a simple cronjob (the cronjob calls up my download manager already preloaded with my download list at 12am, downloads all the items on the list and shuts down at 6am).
Voila!!! I have my money’s worth.