Created
May 31, 2019 05:47
-
-
Save shubham-singh-ss/e3a33116b7055246d8c44d50c52d866c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
wait = WebDriverWait(driver, 10) | |
v_category = "CATEGORY_NAME" | |
for x in links: | |
driver.get(x) | |
v_id = x.strip('https://www.youtube.com/watch?v=') | |
v_title = wait.until(EC.presence_of_element_located( | |
(By.CSS_SELECTOR,"h1.title yt-formatted-string"))).text | |
v_description = wait.until(EC.presence_of_element_located( | |
(By.CSS_SELECTOR,"div#description | |
yt-formatted-string"))).text | |
df.loc[len(df)] = [v_id, v_title, v_description, v_category] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment