enhance twitter script: support profiles and more flexible url parsing