2011-10-04 32 views
0

这是我的html代码,我需要选择字体大小,bgcolor在非脚本中。如何使用硒选择字体大小bgcolor

<iframe src="javascript:''" id="__gwt_historyFrame" tabIndex='-1' style="position:absolute;width:0;height:0;border:0"></iframe> 

    <!-- RECOMMENDED if your web app will not function without JavaScript enabled --> 
    <noscript> 
     <div style="width: 22em; position: absolute; left: 50%; margin-left: -11em; color: red; background-color: white; border: 1px solid red; padding: 4px; font-family: sans-serif"> 
     Your web browser must have JavaScript enabled 
     in order for this application to display correctly. 
     </div> 
    </noscript> 

可以任何budy帮助这一点。

我使用python作为我的scriptin语言。

+0

可以在任何哥们解决我的概率please.past1周我想要这个。 – Sirga

回答

0

你只想抓取文本?你可以看看像美丽的汤(这我不熟悉),或使用简单的regex

import re 
m = re.compile(r'background-color: (\w+);',re.I) 
result = m.search(text) 
if result: 
    bgc = result.group(1) 
+0

Thx为您的重播。 – Sirga

相关问题