!/usr/bin/env python
# -*- coding: utf-8 -*-
import requests
import urllib2
import urllib
import cookielib
import json
import httplib
import re
s = '<input type="hidden" id="token" name="token" value="7C84D7FD0889D23EAA8D266979552D2D"/>'
p=re.compile('.*token"\s+value="(.*?)".*')
m=p.match(s)
print m.group(1)


C:\Python27\python.exe C:/Users/TLCB/PycharmProjects/untitled/mycompany/Django/a12.py
------------
7C84D7FD0889D23EAA8D266979552D2D