Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/311.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python 是否可以在';内获取数据:在'之前;使用硒 我想从这个网站上获取公司的手机号码,但手机号码是以一种我以前从未见过的奇怪格式存储的。每个跨度代表移动电话号码的每个数字。 网站的url为“”。 我添加的图片由于某种原因没有显示“”_Python_Selenium_Selenium Webdriver_Web Scraping - Fatal编程技术网

Python 是否可以在';内获取数据:在'之前;使用硒 我想从这个网站上获取公司的手机号码,但手机号码是以一种我以前从未见过的奇怪格式存储的。每个跨度代表移动电话号码的每个数字。 网站的url为“”。 我添加的图片由于某种原因没有显示“”

Python 是否可以在';内获取数据:在'之前;使用硒 我想从这个网站上获取公司的手机号码,但手机号码是以一种我以前从未见过的奇怪格式存储的。每个跨度代表移动电话号码的每个数字。 网站的url为“”。 我添加的图片由于某种原因没有显示“”,python,selenium,selenium-webdriver,web-scraping,Python,Selenium,Selenium Webdriver,Web Scraping,您需要使用JavaScript访问伪元素::before。您可以在此处查看此答案并尝试修改它: browser.execute_脚本(“return window.getComputedStyle(document.querySelector('.SomeTitle.bar'),':before')).getPropertyValue('content')”您需要使用JavaScript访问伪元素::before。您可以在此处查看此答案并尝试修改它: browser.execute_脚本(“re

您需要使用JavaScript访问伪元素
::before
。您可以在此处查看此答案并尝试修改它:


browser.execute_脚本(“return window.getComputedStyle(document.querySelector('.SomeTitle.bar'),':before')).getPropertyValue('content')”
您需要使用JavaScript访问伪元素
::before
。您可以在此处查看此答案并尝试修改它:


browser.execute_脚本(“return window.getComputedStyle(document.querySelector('.SomeTitle.bar'),':before')).getPropertyValue('content')”
您可以使用WebDriver.findElements中的核心函数。将xpath传递给该节点:“identify_parent_span/span”,其中“identify_parent_span”是用于标识电话号码所在节点的xpath。之后,让跨距数组对其进行迭代,并对每个元素执行getText并生成phoneNumber字符串。

您可以使用WebDriver.findElements中的核心函数。将xpath传递给该节点:“identify_parent_span/span”,其中“identify_parent_span”是用于标识电话号码所在节点的xpath。让跨距数组在其上迭代并对每个元素执行getText并构建phoneNumber字符串。

我添加的图片由于某种原因丢失,我添加的图片由于某种原因丢失,