bernardopires / twitch-chat-logger Goto Github PK
View Code? Open in Web Editor NEWA simple app for logging twitch's chat to a PostgreSQL database.
License: MIT License
A simple app for logging twitch's chat to a PostgreSQL database.
License: MIT License
i tried to understand this code but not able to do so , what this program is about .
i was searching for a program to watch a twitch stream with many accounts to get many viewership rewards
my problem is my pc cant handle more than 6 stream at once so is there anyway to optimize it
I'm getting this error after a couple minutes of logging
Traceback (most recent call last): File "main.py", line 24, in <module> main() File "main.py", line 18, in main manager.run_log_loop() File "/home/myUsername/Desktop/twitch-chat-logger-master/manager.py", line 112, in run_log_loop self._run_popular_streams_loop() File "/home/myUsername/Desktop/twitch-chat-logger-master/manager.py", line 90, in _run_popular_streams_loop self._update_bot_channels(self.bots[i], IndexError: list index out of range
Hi
I am having problems running the code. After successful installation I get:
2015-08-03 21:19:24,276 - ircconnection.logger - INFO - Setting password
2015-08-03 21:19:24,276 - ircconnection.logger - INFO - Registering nick nevencaplar
2015-08-03 21:19:24,277 - ircconnection.logger - INFO - Authing as nevencaplar
Exception in thread Bot 1:
Traceback (most recent call last):
File "/home/caplarn/anaconda/lib/python2.7/threading.py", line 810, in __bootstrap_inner
self.run()
File "/home/caplarn/twitch-chat-logger/bot.py", line 38, in run
data = self.conn.get_data() # returns empty string if times out
File "/home/caplarn/twitch-chat-logger/src/irckit/irc.py", line 249, in get_data
data = self._sock_file.readline()
File "/home/caplarn/anaconda/lib/python2.7/socket.py", line 451, in readline
data = self._sock.recv(self._rbufsize)
File "/home/caplarn/anaconda/lib/python2.7/site-packages/gevent/socket.py", line 392, in recv
self._wait(self._read_event)
File "/home/caplarn/anaconda/lib/python2.7/site-packages/gevent/socket.py", line 298, in _wait
self.hub.wait(watcher)
File "/home/caplarn/anaconda/lib/python2.7/site-packages/gevent/hub.py", line 341, in wait
result = waiter.get()
File "/home/caplarn/anaconda/lib/python2.7/site-packages/gevent/hub.py", line 568, in get
return self.hub.switch()
File "/home/caplarn/anaconda/lib/python2.7/site-packages/gevent/hub.py", line 331, in switch
return greenlet.switch(self)
LoopExit: This operation would block forever
I am running Ubuntu 14.04 and (obviously) anaconda python 2.7. I have also checked that I have newest version (1.01) of the package gevent which could possibly be part of the problem.
I am very interested in this program (seems really great) and would appreciate help!
First off, thank you for doing this! I love the concept, but am having trouble getting going.
Here is my error:
Traceback (most recent call last):
File "main.py", line 3, in
from manager import TwitchManager
File "E:\MyDocs\GitHub\Twitch-Chat-Logger\twitch-chat-logger\manager.py", line 5, in
from irc import run_bot, IRCConnection
ImportError: No module named 'irc'
I have installed the requirements.txt successfully. I am not using fig or docker. I have changed the 'HOST' to 'localhost'
Let me know if I can add any more info (I am new to this stuff).
Thank you,
Aspen
Hi!
I hope this note finds you well.
I am encountering an issue in which the chat_log table is populated as expected, but nothing is ever stored in stream_log. This makes it difficult for me to match the chat comments with associated streaming "sessions." Do you have any idea what might be the problem here?
The database connection seems to be fine, as the chat_log table does get accessed and populated, and I've verified the other table is indeed titled "stream_log" as from the create_tables.sql so it doesn't seem like the entries meant for that table are being sent to a hole somewhere else.
Cheers,
-Neil
My stream_log table is empty, it never gets the stream status logged. Is this a configuration setting I have missed? There is no console output to indicate failed queries.
I am trying to run this code but keep getting the same error. I am using pycharm and I have installed all the requirments through it.
This is the error message
from irc import IRCBot, run_bot, DisconnectedException
ImportError: cannot import name DisconnectedException
Hi, I'm getting this error after using fig up for the first time:
bot_1 | Traceback (most recent call last):
bot_1 | File "main.py", line 24, in
bot_1 | main()
bot_1 | File "main.py", line 16, in main
bot_1 | manager = TwitchManager(channels_amount=args.channels_amount, channels=args.channels, log_filename=args.log_filename)
bot_1 | File "/code/manager.py", line 28, in init
bot_1 | settings.DATABASE['PASSWORD'])
bot_1 | File "/code/db_logger.py", line 11, in init
bot_1 | self.conn = psycopg2.connect(host=host, dbname=name, user=user, password=password)
bot_1 | File "/usr/local/lib/python2.7/site-packages/psycopg2/init.py", line 164, in connect
bot_1 | conn = _connect(dsn, connection_factory=connection_factory, async=async)
bot_1 | psycopg2.OperationalError: could not translate host name "db" to address: Name or service not known
bot_1 |
twitchchatlogger_bot_1 exited with code 1
when I entered fig up for the second time, I got this error:
db_1 | LOG: database system was interrupted; last known up at 2016-05-10 19:47:08 UTC
db_1 | LOG: database system was not properly shut down; automatic recovery in progress
db_1 | LOG: redo starts at 0/1707678
db_1 | LOG: invalid record length at 0/1707808
db_1 | LOG: redo done at 0/17077E0
db_1 | LOG: last completed transaction was at log time 2016-05-10 19:47:09.662833+00
db_1 | LOG: MultiXact member wraparound protections are now enabled
db_1 | LOG: database system is ready to accept connections
db_1 | LOG: autovacuum launcher started
db_1 | FATAL: database "twitch" does not exist
bot_1 | Traceback (most recent call last):
bot_1 | File "main.py", line 24, in
bot_1 | main()
bot_1 | File "main.py", line 16, in main
bot_1 | manager = TwitchManager(channels_amount=args.channels_amount, channels=args.channels, log_filename=args.log_filename)
bot_1 | File "/code/manager.py", line 28, in init
bot_1 | settings.DATABASE['PASSWORD'])
bot_1 | File "/code/db_logger.py", line 11, in init
bot_1 | self.conn = psycopg2.connect(host=host, dbname=name, user=user, password=password)
bot_1 | File "/usr/local/lib/python2.7/site-packages/psycopg2/init.py", line 164, in connect
bot_1 | conn = _connect(dsn, connection_factory=connection_factory, async=async)
bot_1 | psycopg2.OperationalError: FATAL: database "twitch" does not exist
bot_1 |
twitchchatlogger_bot_1 exited with code 1
Any idea how this can be solved?
when i start the program with
python main.py
it gives me this error:
Traceback (most recent call last):
File "main.py", line 3, in
from manager import TwitchManager
File "/home/davide/twitch-chat-logger/manager.py", line 5, in
from irc import run_bot, IRCConnection
ImportError: No module named irc
I recognized this issue on my old server before. It happened every few days (or even weeks). So it was not a big issue.
But on my new server I sometimes don't see a single server ping in the console.
And when I check twitch I see that my logger is not in chat anymore.
Any idea why it loses the connection or freezes?
Is there a log file somewhere that might show the error?
I assume this is a byproduct of the code - stream data pulled with top streamer list - but I just wanted to make sure I'm not doing something incorrectly.
I am attempting to use a version of your code to pull chat logs for a larger subsection of Twitch.
For now, I'm just running a large list of specified channels to log their correlated chats but my research requires me to identify chat differences based on stream differences (e.g., game selection and viewer count). In the near future, I am hoping to adapt your bots to pull the top 1000+ English speaking channels. Based on my minimal knowledge, this would require running multiple list pulls using offset (though I'm unsure how the pagination is currently defined, I'm guessing I'll just trial-and-error).
Any suggestions or fixes for the stream_log problem would be greatly appreciated, as well as advice on language selection, offsetting, or bypassing the cap of 100 channels.
With Twitch API v5 being deprecated, has there been any thought to updating this for the current (Helix) API?
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.