Youtube video yükleme kütüphanesi python
4
●146
- 11-11-2024, 02:29:56API kullanılmadan yükleme yapılacaksa Selenium gibi Web Driver kullanmalısınız. API'de günlük yükleme sınırı 6 fakat driver yazılımları ile 100'e çıkartabilirsiniz. Yükleme aşamasına kadar örnek bir kod bırakacağım.
import time, os,sys,random from selenium import webdriver from selenium.webdriver.common.by import By from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.support import expected_conditions as EC import time from selenium import webdriver from selenium.webdriver.chrome.service import Service from selenium.webdriver.chrome.options import Options chrome_driver_path = "chromedriver.exe" service = Service(chrome_driver_path) chrome_options = Options() chrome_options.add_argument("--log-level=3") chrome_options.add_argument("user-data-dir=C:\\Users\\Administrator\\AppData\\Local\\Google\\Chrome Beta\\User Data\\") chrome_options.binary_location = "C:\\Program Files\\Google\\Chrome Beta\\Application\\chrome.exe" driver = webdriver.Chrome(service=service, options=chrome_options) driver.get("https://studio.youtube.com) time.sleep(3) upload_button = driver.find_element(By.XPATH, '//*[@id="upload-icon"]') upload_button.click() time.sleep(1) file_input = driver.find_element(By.XPATH, '//*[@id="content"]/input') simp_path = "VİDEO-DOSYA-YOLU" ######################################################### abs_path = os.path.abspath(simp_path) file_input.send_keys(abs_path) time.sleep(5) next_button = driver.find_element(By.XPATH, '//*[@id="next-button"]') next_button.click() time.sleep(5) - 11-11-2024, 19:39:10Segomoko adlı üyeden alıntı: mesajı görüntüle
hocam yapılırda zorlar biraz .