youtube video auto upload using selenium with python on localhost
https://www.youtube.com/watch?v=FVumnHy5Tzo&t=1s&ab_channel=HelloWorld
<๐ฌ๐๐ฉ๐๐ ๐ช๐ฅ๐ฉ๐ค 3mins.46sec+ ๐ฉ๐๐๐ฃ ๐ง๐๐ข๐๐๐ฃ๐๐ฃ๐ ๐ฅ๐๐ง๐ฉ in the code
C:\Users\Hp\AppData\Local\Google\Chrome\Application
in my case chrome location(use start in:) is
cd C:\Users\Hp\AppData\Local\Google\Chrome\Application
next,
chrome.exe --remote-debugging-port=9222 --user-data-dir=""(in "enter your localhost path here")
Next, enter this command into the terminal, replacing "enter your localhost path here" with your localhost path:
For example, in my case it is:
chrome.exe --remote-debugging-port=9222 --user-data-dir="C:\Users\Hp\Desktop\Bots\Chromedriver\Localhost"
then new terminal in that folder and enter upload.py
Then, open the command prompt in that folder and paste the following two lines one at a time and press enter. (The code below assumes that you have watched the video and have set up the correct Chrome and localhost path.)
cd C:\Users\Hp\AppData\Local\Google\Chrome\Application
chrome.exe --remote-debugging-port=9222 --user-data-dir="C:\Users\Hp\Desktop\Bots\Chromedriver\Localhost"
In lines 18 and 20th of the code, change the 18th line of the code with video path (create video folder and folder must be in localhost contain folder only) & 20th line with video description change it...
That's it! The URL will open in the previously opened localhost Chrome and upload video automatically.
in cmd enter
pip install Random
and hit enter button
๐ Note:Every time YouTube updates the code, it varies. So, open the YouTube video, press 'Ctrl+Shift+C' to open the developer tools,
๐Python Install Setup=https://youtu.be/4bUOrMj88Pc
๐Note:-
๐if your selenium version is in latest version then the code never run
๐open cmd and enter pip uninstall selenium
And enter
pip install selenium==4.2.1 or pip install selenium==4.2.0
and hit enter
and
python -c "import selenium; print(selenium.version)"
๐๐๐๐จ ๐๐ฃ๐๐ค๐ง๐ข๐๐ฉ๐๐ค๐ฃ ๐๐จ ๐ค๐ฃ๐ก๐ฎ ๐๐ค๐ง ๐๐๐ช๐๐๐ฉ๐๐ค๐ฃal ๐ฅ๐ช๐ง๐ฅ๐ค๐จ๐ ๐๐ฃ๐ ๐ฌ๐ ๐๐ง๐ ๐ฃ๐ค๐ฉ ๐ง๐๐จ๐ฅ๐ค๐ฃ๐จ๐๐๐ก๐ ๐๐ค๐ง ๐๐ฃ๐ฎ ๐ ๐๐ฃ๐ ๐ค๐ ๐๐ก๐ก๐๐๐๐ก ๐๐๐ฉ๐๐ซ๐๐ฉ๐ฎ ๐๐ค๐ฃ๐ ๐๐ฎ ๐ฉ๐๐๐จ ๐ฉ๐ค๐ค๐ก.