Since the new API came out my PHP upload script does not work (Developers key etc) and I have tried a variety of ways to use the YouTube API V3 to upload a video to my account on Youtube without success. I have looked and tried a number of different guides on youtube and the web without success.
I have been manually loading the video at midnight Eastern time and that is getting a pain. Can someone point me to a guide or step by step on how to do this in API V3.
Thanks
EDIT>
I gave up on PHP so I am trying Python which seems to be easier but still having problems.
- I am following the directions here and ran the command line and I got this error:
http://www.cnx-software.com/2014/02/09/how-to-upload-youtube-videos-with-the-command-line-in-linux/
Command Line =
python upload_video.py --file=webcam2-video-hi.avi --title="Canada Timelapse" --description="Video from images taken of Canada." --keywords="webcam", "timelapse", "Time-lapse-Photography", "Canada", "Ontario", "video", "Hill", "weather" --category=19 --privacyStatus="unlisted"Traceback (most recent call last):
File "upload_video.py", line 4, in <module>import httplib2ImportError: No module named httplib2On the same page as the script I see that someone else had this problem and I followed the directions as per below:
Great job.Just an addon, the python script uses httplib2 which is not included in standard python installations, and you will have the following result :
Traceback (most recent call last):
File “upload_video.py”, line 4, inimport httplib2ImportError: No module named httplib2you have to manually include it ; you can install it with pip i presume or in most cases, if you have no admin privileges on the target machine, you need to manually include it in your scriptmaybe you have to change versions, in my case it was :
>$ wget https://pypi.python.org/packages/source/h/httplib2/httplib2-0.9.zip#md5=bdad6a844e0cb890b681fe7c811cfea5>$ unzip httplib2-0.9.zip>$ mv httplib2-0.9.zip/python2/httplib2 ./So I have a folder called httplib2-0.9 that I put in the youtube-upload folder but I am still getting the same error.
I have never used Python before but I suspect I need to install it or something ??
I did the following for info
which python = /usr/bin/pythonfind / -name httplib2 = /youtube-upload/httplib2-0.9/python2/httplib2/youtube-upload/httplib2-0.9/python3/httplib2So finally my question is how do I get Python to see httplib2
Thanks
OK I got the script working after I did the following:
apt-get install python-httplib2 --> Install correctly
Downloaded the latest version google-api-python-client-1.6.1
tar xzvf google-api-python-client-1.6.1.tar.gz
cd google-api-python-client-1.6.1/
mv apiclient/ googleapiclient/ youtube-upload
"Because I had different versions of google-api-python-client there was a problem so I installed pip and fixed it"
apt-get install python-pip
pip install -I google-api-python-client
OK when I ran the script the first time I got http command line to put in the browser to get a Authorisation code to enter on the screen the first time I run the script. I got the code and the script works fine.
The final script looks like this:
#!/bin/bashecho "Start Youtube upload Python script"python upload_video.py --file=/webcam2-video-hi.avi -- title="Ottawa Canada Timelapse " --description="Video" -- keywords="timelapse, Time-lapse-Photography, Canada, Ontario, video, weather" --category=19 --privacyStatus="unlisted" --noauth_local_webserverEnd