A iTerm2 Profiles which can save the current tab's url to the applescript file.
To install it simply do following from your terminal:
git clone --depth=1 https://github.com/hzh-cocong/iTerm2-Workspace.git ~/.iTerm2-Workspace
sh ~/.iTerm2-Workspace/install.sh
You can search the file by Alfred Workflow http://www.packal.org/workflow/iterm2-workspace,download from here.