Cześć,
próbuję dostać się do daty publikacji na tablicy linkedina.
Profil testowy:
https://www.linkedin.com/in/pelagia-rudzi%C5%84ska-530910148/detail/recent-activity/shares/
próbuje znaleźć datę:
i mam 2 klasy w strukturze DOM:
//*[@class='feed-shared-update-v2 feed-shared-update-v2--minimal-padding full-height relative artdeco-card ember-view']/div/div[1]/a/div[3]/span[3]/span/span[1]
//*[@class='feed-shared-update-v2 feed-shared-update-v2--minimal-padding full-height relative feed-shared-update-v2--e2e artdeco-card ember-view']/div/div[1]/a/div[3]/span[3]/span/span[1]
JAk sprawdzic ktory wpis jest pierwszy? Czy w ogole to mozliwe?
Kod:
If mw.IsElementPresent(TA.XPath("(//*[@class='feed-shared-update-v2 feed-shared-update-v2--minimal-padding full-height relative feed-shared-update-v2--e2e artdeco-card ember-view']/div/div[1]/a/div[3]/span[3]/span/span[1] )[" + RV + "]")) = True Then
Cells(SC, 2).Value = mw.FindElementByXPath("(//*[@class='feed-shared-update-v2 feed-shared-update-v2--minimal-padding full-height relative feed-shared-update-v2--e2e artdeco-card ember-view']/div/div[1]/a/div[3]/span[3]/span/span[1] )[" + RV + "]").Text
Else
''MsgBox "Not Available & Requested number of post for this profile has to be less than " & SC - 8
'Exit Sub
Cells(SC, 2).Value = mw.FindElementByXPath("(//*[@class='feed-shared-update-v2 feed-shared-update-v2--minimal-padding full-height relative artdeco-card ember-view']/div/div[1]/a/div[3]/span[3]/span/span[1])[" + RV + "]").Text
Debug.Print Cells(SC, 2).Value
End If
RV = numer wpisu, ktory założyłem...
Pozdrowienia,
Jacek