Extract post ID from URL