Quantcast
Channel: Active questions tagged youtube-api - Stack Overflow
Viewing all articles
Browse latest Browse all 3638

Bot stops running after authorizing it

$
0
0

I’m making a comment bot to raise awareness about conversion therapy and why it’s bad, but there's a weird bug I need help solving.

After I followed a tutorial (https://www.youtube.com/watch?v=6FNWI9z_5J4), it seemed to work, but after I run it and log in to my email, the program just stops and doesn't do what I wanted it to do (comment on videos) Do you know how to fix this?

I don't really know how this works but I'm guessing it has to do with this:

while x < 20:    for line in keywords:        scrape(line)        with open(r'/Users/carte/OneDrive/Desktop/YouTube-Bot-master1/data/keywords.txt') as f:            f.readline()            data = f.read()            f.seek(0)            f.write(data)            f.truncate()            try:                with open(r'/Users/carte/OneDrive/Desktop/YouTube-Bot-master1/data/keywords.txt') as f:                    urls = []                    for url in f:                        rand = random.choice(foo)                        comment_threads_insert(client,                        {'snippet.channelId': 'UCNlM-pgjmd0NNE5I6MzlEGg','snippet.videoId': url,'snippet.topLevelComment.snippet.textOriginal': rand},                        part='snippet')            except:                pass            print("Searching for video based in your keywords...")

I put a print statement in all the functions to see if they ran, and all of them did up to that point. I don't really know what to do other than this. This is all brand new to me.


Viewing all articles
Browse latest Browse all 3638

Trending Articles