bot-hat / youtube-first-comment-bot Goto Github PK
View Code? Open in Web Editor NEWA bot for automatically post comment when a youtube channel upload a new video.
A bot for automatically post comment when a youtube channel upload a new video.
The comment remains hidden for everyone including the creator
Hi,
I was trying to run this program, I installed all modules in requierements.txt
and I run python bot.py
from command line. And I got an error:
File "C:\path\to\bot\bot.py", line 6, in <module> from apiclient.discovery import build_from_document ModuleNotFoundError: No module named 'apiclient.discovery'
.
What should I do?
Hello ,its possible to comment in a specific playlist, but is there any way to comment to a stream video that does not have a playlist?, How to comment to any new video that is uploaded (based on channelid. not playlistid)?
I have no Idea how to make it work, do you have any tutorials? Thanks a lot
I`m getting this error, how to resolve it?
googleapiclient.errors.HttpError: <HttpError 403 when requesting https://www.googleapis.com/youtube/v3/commentThreads?part=snippet&alt=json returned "The comment thread could not be created due to insufficient permissions. The request might not be properly authorized.". Details: "[{'message': 'The comment thread could not be created due to insufficient permissions. The request might not be properly authorized.', 'domain': 'youtube.commentThread', 'reason': 'forbidden', 'location': 'body', 'locationType': 'other'}]">
Have an email?
When I start the bot.py a consol shows up an closes directly.
Idk what to do
I picked up something in the code.
Ultimately we need to use the link variables [cid and lastvid] of the last video on a Playlist, So that when a next video is posted, we fire up a comment.
But currently this is the behaviour:
If we take for example a playlist with 6 videos like this : https://www.youtube.com/playlist?list=PLQbzkJk10-f7EVsnmEOysmAF7zBmTMokr
Using the First Video Variables = Runs the cycle
Using the Last Video Variables = Comments on the first video
Using the Middle Video Variables [Any video in the playlist] = Comments on the first video
We need the last video variables, which is number 6 [https://www.youtube.com/watch?v=oSiqV-7EEks&list=PLQbzkJk10-f7EVsnmEOysmAF7zBmTMokr&index=6], to run the cycle and wait for upload number 7, then comment when that video is uploaded.
How can we alter the code to do that?
Your browser has been opened to visit:
If your browser is on a different machine then exit and re-run this
application with the command-line parameter
--noauth_local_webserver
After I log in with google account .it shows authentication successful.
But then shows
"The playlist identified with the request's playlistId
parameter cannot be found".
Error
What to do??
Pls help asap
What do you mean by API etc how do I set this up?
Also are these comments visible to the creator so lets say its like first comment wins will the channel owner see the bots comment as first?
I will like to get the bot so that it will comment on every single (or atleast most videos) on youtube. Can you please help me with this? I will appreciate your help!
Shaurya Juneja
i getting this error, when authentication is successful, how to resolve it?
Traceback (most recent call last):
File "C:\Users\rainbow\Desktop\Nowy folder (4)\Youtube-First-Comment-Bot-master\bot.py", line 76, in <module>
youtube = get_authenticated_service(args)
File "C:\Users\rainbow\Desktop\Nowy folder (4)\Youtube-First-Comment-Bot-master\bot.py", line 47, in get_authenticated_service
doc = f.read()
File "C:\wszystko\python3.8.4\lib\encodings\cp1250.py", line 23, in decode
return codecs.charmap_decode(input,self.errors,decoding_table)[0]
UnicodeDecodeError: 'charmap' codec can't decode byte 0x98 in position 70859: character maps to <undefined>
How to setup this bot?
You should add more information in the readme file, such as how to get the client_secrets.json
(like going to Google API Console, creating a new project, creating an OAuth client ID credential with type "Desktop app," and downloading the credential) and what type of python environment is used (virtualenv). Also, google-api-python-client does not support versions under 3.5, so that should also be updated in the readme (the code runs perfectly fine even on python 3.8, so no modifications to the code are required). Also, you misspelled interval
in the code. As I mentioned in this issue, the channel ID can't be used directly, so mention that in the readme as well.
Sorry if I sound a bit harsh. I'm just trying to suggest improvements.
Edit: Also, oauth2client has to be installed as well since only installing google-api-python-client results in some missing dependencies.
So I'm having this error, where it seems it's looking for a playlist, any ideas what I'm doing wrong?
<HttpError 404 when requesting https://www.googleapis.com/youtube/v3/playlistItems?alt=json&part=snippet&playlistId=UCGHOni9pO__HNFNg0fj09GQ returned "The playlist identified with the request's <code>playlistId</code> parameter cannot be found.">
Invalid file format. See https://developers.google.com/api-client-library/python/guide/aaa_client_secrets Expected a JSON object with a single property for a "web" or "installed" application
WARNING: Please configure OAuth 2.0
To make this sample run you will need to populate the client_secrets.json file
found at:
...\client_secrets.json
with information from the APIs Console
https://console.developers.google.com
For more information about the client_secrets.json file format, please visit:
https://developers.google.com/api-client-library/python/guide/aaa_client_secrets
Comments are successful posted using this auto bot, but those comments are not visible to other users
On selecting PLAY ALL in the specified channel, i got descending sorted (recent one in first list) playlist
But these comments are not visible to other users including channel owner.
Also after some time, this comment is automatically disappear.
Somehow Google is detecting this as invalid comment and does not even count it as valid comment
The bot works perfectly...
But i have an issue...
It can't write comment 1st ..
Yesterday i tested it..
The channel uploaded the video but my bot wrote the comment after 1-2min..
It just can't wrote very 1st ..
Any feedback??
Hi i'm new here and I'm curious how can i add more channel CID?
Thanks in advance
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.