2016-01-20 73 views
-2

www.linkedin.com/in/jennifer-smith-aa97685 is in F1 我想使用谷歌瀏覽器檢測工具提取當前公司的公司網址。 我嘗試了很多,但沒有工作。這裏是我的代碼:xpath查詢從href中提取url

=importxml(F1, "//*[@id='experience']/ul/li[1]/header/h5[1]/a") 

<a href="https://www.linkedin.com/company/suntrust-bank?trk=ppro_cprof"><img class="lazy-loaded" alt="SunTrust" src="https://media.licdn.com/media/p/5/005/097/1e1/364727b.png"></a> 

我想在單元格G1中導入https://www.linkedin.com/company/suntrust-bank?trk=ppro_cprof

任何想法/幫助。

+0

這看起來並不像Chrome檢查我,你的意思是谷歌表? –

+0

是的,它在谷歌電子表格。 –

回答

0

嘗試用下面的XPath

//table[@class='extra-info']//a[contains(.,'SunTrust Bank')]/@href 
+0

它確實與這個LinkedIn配置文件一起工作,但我有多個linkedin個人資料網址。 –

+0

哦,這意味着你需要這個定位器通用,所以可以識別linkden中的任何配置文件..對吧? –

+0

你是對的Shubham。 –

0

這適用於所有的人概況:

=IMPORTXML("profile url","//*[@data-section='currentPositions']/*[1]/a/@href")