ugly first python file
invalid url detect and add sample output
prepare writing in database