如何通过Python';s硒库
请有人能帮我从html电子邮件中提取一些文本吗?它位于嵌套表中的信息。我试图通过xpath提取它,并首先通过宽度捕获父表,但没有成功:/ 如果硒是愚蠢的方法,请给我更好的方向。我选择它是因为我以后会用它来处理 一些基于我将在这里提取的信息的网站 多谢各位 这是一个文本(本例中为电话)示例,我需要从中取出: 608910536如何通过Python';s硒库,python,selenium-webdriver,Python,Selenium Webdriver,请有人能帮我从html电子邮件中提取一些文本吗?它位于嵌套表中的信息。我试图通过xpath提取它,并首先通过宽度捕获父表,但没有成功:/ 如果硒是愚蠢的方法,请给我更好的方向。我选择它是因为我以后会用它来处理 一些基于我将在这里提取的信息的网站 多谢各位 这是一个文本(本例中为电话)示例,我需要从中取出: 608910536 以下是html格式的电子邮件示例: <html xmlns="http://www.w3.org/1999/xhtml"> &l
以下是html格式的电子邮件示例:
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta http-equiv="Content-Language" content="cs" />
<meta http-equiv="cache-control" content="no-cache" />
<meta http-equiv="X-UA-Compatible" content="IE=8" />
<style type="text/css">
* { margin: 0; padding: 0; }
BODY {font-family: Arial;color: black;margin: 5px 30px 30px 30px;}
</style>
<title>OctopusPro REPORT</title>
</head>
<body bgcolor="#717272" style="background:#717272;" xmlns="">
<center>
<table cellpadding="0" cellspacing="0" border="0" width="765" bgcolor="#717272" style="width:765px;margin: 0 auto;background:#717272;">
<tr>
<td style="border-top: 1px solid #808080; border-bottom: 1px solid #808080;">
<center>
<table cellpadding="0" cellspacing="8" border="0" width="740" style="width:740px;margin: 0 auto;">
<tr>
<td width="205" style="width:205px;">
<a href="http://www.octopuspro.cz" target="_blank" style="border:none;text-decoration:none;">
<img src="cid:logo.png" alt="OctopusPro" title="OctopusPro" style="border:none;" />
</a>
</td>
<td width="160" style="width:150px;"> </td>
<td width="350" align="left" style="width:350px;text-align:left;">
<span style="font-family:Arial;font-size:12px;">
<a href="http://monitoring.octopuspro.cz/default.aspx" target="_blank" style="color: #c7c7c7; text-decoration: none;" alt="ON-LINE PŘIHLÁŠENÍ DO APLIKACE OCTOPUSPRO">
<span style="color: #f68a26;">»</span>
<span style="text-decoration:none;">ON-LINE PŘIHLÁŠENÍ DO APLIKACE OCTOPUSPRO</span></a>
<br />
<a href="http://monitoring.octopuspro.cz/default.aspx" target="_blank" style="color: #c7c7c7; text-decoration: none;" alt="VYHLEDÁVÁNÍ INZERCE DLE TEL. ČÍSLA A EMAILU">
<span style="color: #f68a26;">»</span>
<span style="text-decoration:none;">VYHLEDÁVÁNÍ INZERCE DLE TEL. ČÍSLA A EMAILU</span></a>
<br />
<a href="http://monitoring.octopuspro.cz/List.aspx?fulltext=true" target="_blank" style="color: #c7c7c7; text-decoration: none;" alt="VYHLEDÁVÁNÍ INZERCE V ARCHIVU">
<span style="color: #f68a26;">»</span>
<span style="text-decoration:none;">VYHLEDÁVÁNÍ INZERCE V ARCHIVU</span></a>
<br />
<a target="_blank" style="color: #c7c7c7; text-decoration: none;" alt="HISTORIE ZPRACOVANÝCH INZERÁTŮ" href="http://monitoring.octopuspro.cz/MP_Main.aspx?processedadvert=1&IdUser=48880&DateFrom=25.5.2021&DateTo=25.5.2021">
<span style="color: #f68a26;">»</span> <span style="text-decoration:none;">HISTORIE ZPRACOVANÝCH INZERÁTŮ</span></a>
<br />
<a href="http://octopuspro.cz/mclient/Help.htm" target="_blank" style="color: #c7c7c7; text-decoration: none;" alt="NÁPOVĚDA PRO PRÁCI S WEBOVOU APLIKACÍ">
<span style="color: #f68a26;">»</span>
<span style="text-decoration:none;">NÁPOVĚDA PRO PRÁCI S WEBOVOU APLIKACÍ</span></a>
<br />
<a href="http://octopuspro.cz/mclient/_VideoSkoleni.aspx" target="_blank" style="color: #c7c7c7; text-decoration: none;" alt="VIDEO NÁPOVĚDA">
<span style="color: #f68a26;">»</span>
<span style="text-decoration:none;">VIDEO NÁPOVĚDA</span></a>
</span>
</td>
</tr>
</table>
</center>
</td>
</tr>
<tr>
<td style="border-bottom: 1px solid #808080;">
<center>
<table cellpadding="0" cellspacing="8" border="0" width="740" style="width:740px;margin: 0 auto;">
<tr>
<td align="left" style="text-align:left;">
<span style="font-family:Arial;font-size:12px;color:#c7c7c7;">
Monitoring realit ze dne: <strong>25.05.2021</strong><br />Uživatel: <strong>Káňa Ondřej</strong>, Realitní společnostM&M pobočka Brno 7</span>
</td>
</tr>
</table>
</center>
</td>
</tr>
</table>
<table cellpadding="0" cellspacing="0" border="0" width="765" bgcolor="white" style="width:765px;margin: 0 auto;background: white;font-size:13px;">
<tr>
<td style="background:#fbcd31;" bgcolor="#fbcd31">
<!-- HEADER -->
<table cellpadding="0" cellspacing="8" border="0" width="765" style="width:765px;margin: 0 auto;font-size:14px;">
<tr>
<td width="130" style="width: 130px; padding: 4px 8px; text-align: center;" align="center" valign="middle">
<strong> KRAJ </strong>
<a id="header_navigation" name="header_navigation" style="text-decoration:none;"></a>
</td>
<td width="130" style="width: 130px; padding: 4px 8px; text-align: center;" align="center" valign="middle">
<strong>TRANSAKCE</strong>
</td>
<td width="220" style="width: 220px; padding: 4px 8px; text-align: center;" align="center" valign="middle">
<strong>KATEGORIE</strong>
</td>
<td width="120" style="width: 120px; padding: 4px 8px; text-align: center;" align="center" valign="middle">
<strong>NABÍDKA</strong>
</td>
<td width="120" style="width: 120px; padding: 4px 8px; text-align: center;" align="center" valign="middle">
<strong>POPTÁVKA</strong>
</td>
</tr>
</table>
</td>
</tr>
</table>
<table cellpadding="0" cellspacing="8" border="0" width="765" bgcolor="white" style="width:765px;margin: 0 auto;background: white;font-size:12px;text-align:left;">
<tr>
<td width="130" rowspan="1" bgcolor="#dddddd" align="center" valign="middle" style="width: 130px; padding: 0 8px; background: #dddddd; border: 1px solid #dddddd; text-align: center;">
<strong>JIHOMORAVSKÝ</strong>
</td>
<td width="130" rowspan="1" bgcolor="#dddddd" align="center" valign="middle" style="width: 130px; padding: 0 8px; background: #dddddd; border: 1px solid #dddddd; text-align: center;">prodej</td>
<td width="220" bgcolor="#dddddd" style="width: 220px; height: 30px; padding: 0 8px 0 30px; background: #dddddd; border: 1px solid #dddddd;">Pozemek</td>
<td width="120" style="width: 120px; padding: 0 8px; background: #fbcd31; border: 1px solid #be780a; text-align: center;">
<a href="#11/4/1/1" style="width: 127px; color: #6a4204; text-decoration:underline; text-align: center;">ZOBRAZIT</a>
</td>
<td width="120" style="width: 120px; padding: 0 8px; background: #fbcd31; border: 1px solid #be780a; text-align: center;">
<span> </span>
</td>
</tr>
</table>
<table cellpadding="0" cellspacing="0" border="0" width="765" bgcolor="#717272" style="width:765px;margin: 0 auto;background:#717272;">
<tr>
<td> </td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td>
<center>
<table cellpadding="0" cellspacing="0" border="0" width="765" bgcolor="white" style="width:765px;margin: 0 auto;background: white;font-size:13px;">
<tr>
<td style="background:#fbcd31;" bgcolor="#fbcd31">
<!-- ZÁHLAVÍ OBLASTI (KRAJ) -->
<table cellpadding="0" cellspacing="8" border="0" width="765" style="width:765px;margin: 0 auto;font-size:13px;">
<tr>
<td width="130" style="width: 130px; text-align: left;" align="left" valign="middle">
<strong style="display:block; padding: 4px;">
Kraj:
<span style="font-size: 130%;">JIHOMORAVSKÝ</span><a id="11/4/1/1" name="11/4/1/1" style="text-decoration:none;"></a></strong>
</td>
<td width="130" style="width: 130px; text-align: right;" align="right" valign="middle">
<strong style="display:block; padding: 4px;">
<a href="http://monitoring.octopuspro.cz/default.aspx" target="_blank" style="color: black; text-decoration: underline;">Otevřít on-line OctopusPro monitoring</a>
</strong>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td>
<table cellpadding="0" cellspacing="0" border="0" width="100%" style="width:100%; margin: 0 auto; font-size: 13px; border-left: 1px solid #9b9a99; border-right: 1px solid #9b9a99;">
<tr>
<td width="95" bgcolor="#867bae" align="center" style="width: 95px; padding: 4px; background: #867bae; border: 1px solid #9b9a99; border-left: 1px solid #867bae; border-right: none; text-align: center;">
<strong style="color: white;">NABÍDKA</strong>
</td>
<td align="center" style="padding: 4px; text-align: center; border: 1px solid #9b9a99; border-right: none; border-left: none;">
Okres: <strong style="font-size: 14px;">BRNO / POZEMEK</strong></td>
<td width="95" bgcolor="#6cc04b" align="center" style="width: 95px; padding: 4px; background: #6cc04b; border: 1px solid #9b9a99; border-right: 1px solid #6cc04b; border-left: none; text-align: center;">
<strong style="color: white;">PRODEJ</strong>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td>
<!-- INZERÁT -->
<center>
<table cellpadding="0" cellspacing="4" border="0" width="745" bgcolor="#dddddd" style="width:745px; margin: 0 auto; border: 1px solid #9b9a99; background: #dddddd; font-size: 12px; text-align: left;">
<tr>
<td width="60" align="center" valign="top" style="width: 60px; text-align: center; vertical-align: top;">
<strong style="color:#717272;font-size: 12px;">
datum:
</strong>
</td>
<td width="450" align="left" valign="top" style="width: 450px; text-align: left; vertical-align: top;">
<strong style="font-size: 15px;">Pozemek, Brno, 904 m2</strong>
<span style="color:#717272;"> (id:7175832)</span>
</td>
<td width="80" align="left" valign="top" style="width: 80px; text-align: left; vertical-align: top;">
<strong style="color:#717272;font-size: 12px;">
cena:
</strong>
</td>
<td width="75" align="left" valign="top" style="width: 75px; text-align: left; vertical-align: top;">
<strong style="color:#717272;font-size: 12px;">
kontakt:
</strong>
</td>
<td width="70" align="left" valign="top" style="width: 70px; text-align: left; vertical-align: top;">
<strong style="color:#717272;font-size: 12px;">
opak. tel.:
</strong>
</td>
</tr>
<tr>
<td align="center" valign="top" style="text-align: center; vertical-align: top;">25.5.21</td>
<td align="left" width="400" valign="top" style="width: 400px; text-align: left; vertical-align: top;">Stavebni pozemek 904m2
<a target="_blank" href="https://reality.bazos.cz/inzerat/137022587/stavebni-pozemek-modrice.php" style="color: #ff0000; text-decoration: underline;">(zdroj)</a><br /><span></span></td>
<td align="left" valign="top" style="text-align: left; vertical-align: top; font-size: 13px;">
<strong>8 400 000 Kč</strong>
</td>
<td align="left" valign="top" style="text-align: left; vertical-align: top; font-size: 15px;">
<strong>
<span>
<span>608910536<br /></span>
</span>
</strong>
</td>
<td align="center" valign="top" style="text-align: center; vertical-align: top;">
<table width="100%" height="100%" cellpadding="0" cellspacing="0" border="0" style="height:100%;width:100%;font-size: 12px;">
<tr>
<td align="center" valign="top" style="text-align: center;vertical-align:top;">
<a target="_blank" style="color: #ff0000; text-decoration: underline;" href="http://monitoring.octopuspro.cz/List.aspx?phone=608910536">(5x)</a>
</td>
</tr>
<tr>
<td align="right" valign="bottom" style="text-align: right;vertical-align:bottom;">
<br />
<br />
<a href="#header_navigation">zpět</a>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td colspan="5" align="right">
<a style="color:blue;" href="http://monitor.octopuspro.cz/List.aspx?s=email&idHitx=7175832" target="_blank">detail v aplikaci</a>
</td>
</tr>
</table>
</center>
</td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td> </td>
</tr>
</table>
</center>
</td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td> </td>
</tr>
</table>
</center>
<center>
<table cellpadding="0" cellspacing="0" border="0" width="740" style="width:740px;margin: 0 auto;">
<tr>
<td>
<div style="font-size: 9pt; color:black;">V případě jakýchkoliv dotazů a informací, prosím, kontaktujte oddělení péče o klienty<br /><br />
(Mobil: +420 776 259 259,
E-mail: <a style="color: silver;" href="mailto:info@octopuspro.cz">info@octopuspro.cz</a>,
Web: <a style="color: silver;" href="http://www.octopuspro.cz">www.octopuspro.cz</a>)
</div>
<div style="font-size: 7pt; color:black;padding-top:10px;margin-top:10px; ">Právní informace: Tento e-mail .</div>
</td>
</tr>
</table>
</center>
</body>
</html>
*{边距:0;填充:0;}
正文{字体系列:Arial;颜色:黑色;边距:5px 30px 30px 30px;}
章鱼报告
监测现实:2021年5月25日;M波波卡布尔诺7号
KRAJ
克拉吉:
吉霍莫拉夫斯克
NABÍDKA
Okres:BRNO/POZEMEK
PRODEJ产品
资料:
波泽梅克,布尔诺,904平方米
(识别号:7175832)
欧洲标准化委员会:
康塔克:
奥帕克。电话:
25.5.21
斯塔维布尼波泽梅克904m2
8400000 Kč
608910536