Hello everyone and thanks for checking this post!
I will give you a run down of what my program is trying to achieve first.
So I want to try try and make a program that can get a youtube playlist load all the videos on it and for each one create a variable called view count (name of video)! The amount of variables that are created has to be dynamic acording to the amount of videos. Once this is done the values from each variable are then saved to a local database so that the program can keep track even when closed.
What I am stuck on!
I can not find a way to generate multiple variables without actually coding each one in! There must be a way of seeing the amount of videos and then getting each ones name and creating a new int for each video with that information. Then each time the link for that video is accessed it adds one to the int.
Some helpfull information!
The Xpath for the title of each youtube video is the same being...
//*[@id="eow-title"]
The Xpath for the text that displays how many videos are on a playlist is...
//*[@id="pl-header"]/div[2]/div[1]/div[1]/ul/li[2]/text()
Thanks so much for helping me with this problem!
Aucun commentaire:
Enregistrer un commentaire