- if 'links' in post:
- links = dict((l.rel, l) for l in post.links if 'html' in l.type)
- if 'self' in links:
- return links['self'].href
- elif 'alternate' in links:
- return links['alternate'].href
- if 'href' in post:
- return post.href
- return None