TikTok-content-farm icon indicating copy to clipboard operation
TikTok-content-farm copied to clipboard

Problem Youtube API

Open turpez opened this issue 4 years ago • 19 comments

I don't know where to put the youtube api key

Traceback (most recent call last): File ".\main.py", line 65, in api = Api(api_key=youtube_api_key) NameError: name 'youtube_api_key' is not defined

turpez avatar May 19 '21 00:05 turpez

Can you give me the config file, it seems to be missing from the github folder?

Thank you very much

benkiller47 avatar May 28 '21 11:05 benkiller47

How's the config file ?

turpez avatar May 28 '21 12:05 turpez

What do you need ?

turpez avatar May 28 '21 12:05 turpez

In your main.py file at line 65,


api = Api(api_key="your api key here")

zbeucler2018 avatar May 28 '21 12:05 zbeucler2018

if name == 'main': api = Api(api_key=youtube_api_key) log.debug("API inited") do = True

turpez avatar May 28 '21 12:05 turpez

line 64 to 67

turpez avatar May 28 '21 12:05 turpez

if name == 'main':

api = Api(api_key=youtube_api_key)

log.debug("API inited")

do = True

Replace YouTube_api_key with your YouTube API key on line 65 and I believe it should work. Do you know how to get a YouTube api key?

zbeucler2018 avatar May 28 '21 12:05 zbeucler2018

I put them and its me but name error is not defined

turpez avatar May 28 '21 12:05 turpez

must go to the google cloud and have the youtube key is that?

turpez avatar May 28 '21 12:05 turpez

I put them and its me but name error is not defined

You replaced youtube_api_key with your YouTube api key and you are still getting the same name error? It is still undefined?

zbeucler2018 avatar May 28 '21 12:05 zbeucler2018

yes

turpez avatar May 28 '21 12:05 turpez

he tells me that the key is not defined

turpez avatar May 28 '21 12:05 turpez

must go to the google cloud and have the youtube key is that?

Yes I believe you get the YouTube API keys from Google. This site should help https://developers.google.com/youtube/v3/getting-started

zbeucler2018 avatar May 28 '21 12:05 zbeucler2018

I don't know why my key is not defined

turpez avatar May 28 '21 12:05 turpez

Do you have a solution?

Do you have the same problem?

turpez avatar May 28 '21 12:05 turpez

How's the config file ?

Is isn't there supposed to be a config file inside of the folder? in github you can only download 4 files , souldn't it have a config file also?

It gives me this error : python3 main.py Traceback (most recent call last): File "/home/mrdev/tiktok/TikTok-content-farm/main.py", line 4, in from config import * ModuleNotFoundError: No module named 'config'

Thank you

benkiller47 avatar May 28 '21 13:05 benkiller47

testP

turpez avatar May 28 '21 14:05 turpez

In my file there is that his

turpez avatar May 28 '21 14:05 turpez

can you give me a youtube api key, i don't have it but i really want to try your sripts.

thanhtuvietnam avatar Sep 15 '21 08:09 thanhtuvietnam