I want to retrieve data on a website
my code only get description
What I want
1. Video Url
2. Description
3. fetch all pages
this is the html code
results
my code only get description
What I want
1. Video Url
2. Description
3. fetch all pages
VBA Code:
Public Sub Try()
Dim driver As New WebDriver
Dim titles As WebElements
Dim title As WebElement
Dim sheetName As Worksheet
Dim i As Integer
i = 2
driver.Start "chrome", "https://www.tiktok.com/search?q=funny"
driver.Get "/"
Application.Wait (Now + TimeValue("0:00:15"))
Set sheetName = Sheets("Sheet1")
Set titles = driver.FindElementsByCss("div.tiktok-1ejylhp-DivContainer")
For Each title In titles
sheetName.Cells(i, 1).Value = title.Text
i = i + 1
Next
Application.Wait (Now + TimeValue("0:00:05"))
driver.Quit
End Sub
this is the html code
results
Last edited: