Update middleware.py
Update google.py
Update google.py

Some people do not have urls and that's going to cause exception in the previous code.
Merge pull request #24 from SpaceFlyer/master

Fix issue 23, Thanks @SpaceFlyer!