Giter Club home page Giter Club logo

ytstudio's Introduction

Youtube Studio

Unofficial Async YouTube Studio API. Set of features limited or not provided by official YouTube API!

This is the Python version of this project. All thanks going to @adasq :)

Installation

You can install with PIP.

pip install ytstudio

Features

Look at the documentation: Click here

Login

You need cookies for login. Use an cookie manager(EditThisCookie) for needed cookies.

Also you need SESSION_TOKEN for (upload/edit/delete) video. How to get Session Token?

TO-DO

  • Better Documentation
  • Better Tests
  • More Functions

Author

Yusuf Usta, [email protected]

Note

This library is in no way affiliated with YouTube or Google. Use at your own discretion. Do not spam with this.

ytstudio's People

Contributors

yusufusta avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

ytstudio's Issues

'Request contains an invalid argument.'

When trying to upload a video I'm getting this error:
{'error': {'code': 400, 'message': 'Request contains an invalid argument.', 'errors': [{'message': 'Request contains an invalid argument.', 'domain': 'global', 'reason': 'badRequest'}], 'status': 'INVALID_ARGUMENT'}}
After a bit of investigation I've determined that this is happening because no sessionToken is being provided wben uploading the video.

'ytcfg is not defined' error occured since a weeks ago

First, thank you for your great work.
I have used ytstudio module about a month and it operates very well until a week ago. But since a week ago 'ytcfg is not defined' error is occurring whenever 'await yt.login()' calls.

To solve the problem, I erased all the cookies and re-login in studio.youtube.com on browser several times, and correct the
new cookies data and printed all cookies data in ytstudio's Studio class to confirm if cookies is correct or not

Cookie datas in login.json was correct (include SESSION_TOKEN too (from developer mode /grst ) but looks like it can't read the site's script and 'ytcfg' object.
Is studio.youtube.com changed recently , or Am I missing something?

[ in my_program.py ]

...
await yt.login()
...

[ in module ytstudio/init.py ]
...
async def login(self) -> bool:
....
self.js.execute(f"{script} window.ytcfg = ytcfg;")

==>

File "/home/utylee/.virtualenvs/misc/lib/python3.8/site-packages/ytstudio/init.py", line 68, in login
self.js.execute(
js2py.internals.simplex.JsException: ReferenceError: ytcfg is not defined

how to

hi, what to do after running pip install ytstudio ? can you give me a basic simple tutorial to use this script correctly?

Unable to Upload Video

Hi Yusufusta, great work
This code used to run on previous commit but getting following error :

File "D:\ytstudio\examples\upload_video.py", line 23, in main
print(f"successfully uploaded! videoId: {sonuc['videoId']}")

KeyError: 'videoId'

Do you have any idea why this is popping up ?
Thanks in advance.

Tags function, please

please add the function of adding tags

this works perfectly, but this message appeared {'error': {'code': 403, 'message': 'The caller does not have permission', 'errors': [{'message': 'The caller does not have permission', 'domain':
'global', 'reason': 'forbidden'}], 'status': 'PERMISSION_DENIED'}}

Help Please!

I'm new to this topic) Can you help me?
I downloaded the files using pip, what should I do next?
sfsre

Request contains an invalid argument.

i'm getting 'Request contains an invalid argument.' after try to use scheduledUploadVideo function. the upload works normally but this error message appears when the code try to schedule it. i'm debuging but i didn't found the problem, i think its something with METADATA_UPDATE template. Thank you!!!

Translating Delete to NodeJS?

Hey man, thanks for this initial translation of this great API tool !!!

Do you perhaps know of a tool that can translate your Delete function over to NodeJS (since adasq's scripts don't have it yet) ?
I'm allergic to using Python, unfortunately, and wouldn't be able to get it running on my machines. I've done thorough searches online but can't find any tools for doing a proper translation for this particular kind of script.

Cheers!

How do you edit a video immediately after you upload it?

Based on your example given it seems like you have to manually key in the video_id to be able to edit or delete the video which is inefficient. How can we edit the video immediately after we upload it so that we can automate this process?

PERMISSION_DENIED

Double checked everything but getting this error after upload and the video is not getting uploaded to the channel

{
    "error": {
        "code": 403,
        "message": "The caller does not have permission",
        "errors": [
            {
                "message": "The caller does not have permission",
                "domain": "global",
                "reason": "forbidden"
            }
        ],
        "status": "PERMISSION_DENIED"
    }
}

Hey read /

Hi. can you please write a video how video download works? please)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.