python extract markup