language: Python (python 2.7.3)
date: 575 days 17 hours ago
link:
visibility: public
1
2
3
4
5
from urlparse import urlparse
 
print urlparse('http://www.mydomain.com/hithere?image=2934').path.split('/')[1]
print urlparse('http://www.mydomain.com/hithere/something/else').path.split('/')[1]