Git Product home page Git Product logo

rxbot's Introduction

RXBOT is now depreciated as Google Play Music is no longer functional. Rxbot should still work with Youtube and online media file song requests, but is no longer being updated or supported. Thanks for your support in the past! Check out my other project, IntRX for an up to date bot.

Info can be found here: https://rxbots.net/rxbot-setup.html

RXBot is a song request bot for Twitch streamers: viewers can request songs in chat, and they will be added to a queue for the streamer to listen to while they stream. What makes RXBot unique is that it supports not only YouTube, but Google Play Music as well (though you must have a subscription to use that functionality). It's also very lightweight, so it will have virtually no impact on system performance.

We also plan on turning RXBot into a full-blown chatbot, so stay tuned!

⚠️ Please report bugs using Github's Issues tab, or in the Rxbots Discord. ⚠️

RXBot is a multi-purpose IRC bot for the video game streaming service Twitch. It's primarily focused on song request- allowing stream viewers to request any song of their choice from Google Play Music, Youtube, or just any online music file. Unfortunately, since Google has chosen to discontinue Google Play Music, RXBot is no longer being updated. The code is old and less clean than IntRX, but fully functional and quite stable nonetheless.

rxbot's People

Contributors

gcfrxbots avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

kc0zhq inib

rxbot's Issues

GPM occasionally crashing when trying to get a song

This was for Jack Sparrow by The Lonely Island, also noticed it with My Beast by Smash Into Pieces

(requests kwargs: {'method': 'GET', 'url': 'https://mclients.googleapis.com/music/mplay', 'allow_redirects': False, 'headers': {'X-Device-ID': '00E04C6814EC', 'Authorization': '<omitted>'}, 'params': {'opt': 'hi', 'net': 'mob', 'pt': 'e', 'slt': '1566525942053', 'sig': b'JIceCj1-KwB6xFqtg6-CYUiVw6U', 'mjck': 'T6qd7g2pioxyxria4cqk2ddkab4', 'hl': 'en_US', 'dv': 0, 'tier': 'aa'}})
(response was: '<HTML>\n<HEAD>\n<TITLE>Not Found</TITLE>\n</HEAD>\n<BODY BGCOLOR="#FFFFFF" TEXT="#000000">\n<H1>Not Found</H1>\n<H2>Error 404</H2>\n</BODY>\n</HTML>\n')
Exception in thread Thread-2:
Traceback (most recent call last):
  File "C:\Program Files\Python37\lib\site-packages\gmusicapi\protocol\shared.py", line 222, in perform
    response.raise_for_status()
  File "C:\Program Files\Python37\lib\site-packages\requests\models.py", line 940, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 400 Client Error: Bad Request for url: https://mclients.googleapis.com/sj/v2.5/fetchtrack?alt=json&nid=T6qd7g2pioxyxria4cqk2ddkab4&hl=en_US&dv=0&tier=aa

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Program Files\Python37\lib\threading.py", line 917, in _bootstrap_inner
    self.run()
  File "C:\Program Files\Python37\lib\threading.py", line 865, in run
    self._target(*self._args, **self._kwargs)
  File "C:/Users/Grant/IdeaProjects/rxbot3/Run.py", line 164, in tick
    nowplaying = srcontrol.playsong()
  File "C:\Users\Grant\IdeaProjects\rxbot3\SongRequest.py", line 212, in playsong
    saveAlbumArt(self.songkey)
  File "C:\Users\Grant\IdeaProjects\rxbot3\SongRequest.py", line 103, in saveAlbumArt
    songinfo = Mobileclient.get_track_info(api, songkey)
  File "<C:\Program Files\Python37\lib\site-packages\decorator.py:decorator-gen-144>", line 2, in get_track_info
  File "C:\Program Files\Python37\lib\site-packages\gmusicapi\utils\utils.py", line 293, in wrapper
    return function(*args, **kw)
  File "C:\Program Files\Python37\lib\site-packages\gmusicapi\clients\mobileclient.py", line 2193, in get_track_info
    return self._make_call(mobileclient.GetStoreTrack, store_track_id)
  File "C:\Program Files\Python37\lib\site-packages\gmusicapi\clients\mobileclient.py", line 48, in _make_call
    return super(Mobileclient, self)._make_call(protocol, *args, **kwargs)
  File "C:\Program Files\Python37\lib\site-packages\gmusicapi\clients\shared.py", line 90, in _make_call
    return protocol.perform(self.session, self.validate, *args, **kwargs)
  File "C:\Program Files\Python37\lib\site-packages\gmusicapi\protocol\shared.py", line 230, in perform
    raise CallFailure(err_msg, call_name)
gmusicapi.exceptions.CallFailure: GetStoreTrack: 400 Client Error: Bad Request for url: https://mclients.googleapis.com/sj/v2.5/fetchtrack?alt=json&nid=T6qd7g2pioxyxria4cqk2ddkab4&hl=en_US&dv=0&tier=aa
(requests kwargs: {'method': 'GET', 'url': 'https://mclients.googleapis.com/sj/v2.5/fetchtrack', 'headers': {'Content-Type': 'application/json', 'Authorization': '<omitted>'}, 'params': {'alt': 'json', 'nid': 'T6qd7g2pioxyxria4cqk2ddkab4', 'hl': 'en_US', 'dv': 0, 'tier': 'aa'}})
(response was: '{"error":{"errors":[{"domain":"global","reason":"badRequest","message":"Bad Request"}],"code":400,"message":"Bad Request"}}')```

gmusicapi bad request

Seems like the bot isnt detecting that this is a youtube link and is instead trying to play GPM

Exception in thread Thread-2:
Traceback (most recent call last):
File "C:\Program Files\Python37\lib\site-packages\gmusicapi\protocol\shared.py", line 222, in perform
response.raise_for_status()
File "C:\Program Files\Python37\lib\site-packages\requests\models.py", line 940, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 400 Client Error: Bad Request for url: https://mclients.googleapis.com/sj/v2.5/fetchtrack?alt=json&nid=TgMKoQxyWtk&hl=en_US&dv=0&tier=aa

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\Program Files\Python37\lib\threading.py", line 917, in _bootstrap_inner
self.run()
File "C:\Program Files\Python37\lib\threading.py", line 865, in run
self._target(*self._args, **self._kwargs)
File "C:/Users/Grant/IdeaProjects/rxbot3/Run.py", line 164, in tick
nowplaying = srcontrol.playsong()
File "C:\Users\Grant\IdeaProjects\rxbot3\SongRequest.py", line 212, in playsong
saveAlbumArt(self.songkey)
File "C:\Users\Grant\IdeaProjects\rxbot3\SongRequest.py", line 103, in saveAlbumArt
songinfo = Mobileclient.get_track_info(api, songkey)
File "<C:\Program Files\Python37\lib\site-packages\decorator.py:decorator-gen-144>", line 2, in get_track_info
File "C:\Program Files\Python37\lib\site-packages\gmusicapi\utils\utils.py", line 293, in wrapper
return function(*args, **kw)
File "C:\Program Files\Python37\lib\site-packages\gmusicapi\clients\mobileclient.py", line 2193, in get_track_info
return self._make_call(mobileclient.GetStoreTrack, store_track_id)
File "C:\Program Files\Python37\lib\site-packages\gmusicapi\clients\mobileclient.py", line 48, in _make_call
return super(Mobileclient, self)._make_call(protocol, *args, **kwargs)
File "C:\Program Files\Python37\lib\site-packages\gmusicapi\clients\shared.py", line 90, in _make_call
return protocol.perform(self.session, self.validate, *args, **kwargs)
File "C:\Program Files\Python37\lib\site-packages\gmusicapi\protocol\shared.py", line 230, in perform
raise CallFailure(err_msg, call_name)
gmusicapi.exceptions.CallFailure: GetStoreTrack: 400 Client Error: Bad Request for url: https://mclients.googleapis.com/sj/v2.5/fetchtrack?alt=json&nid=TgMKoQxyWtk&hl=en_US&dv=0&tier=aa
(requests kwargs: {'method': 'GET', 'url': 'https://mclients.googleapis.com/sj/v2.5/fetchtrack', 'headers': {'Content-Type': 'application/json', 'Authorization': ''}, 'params': {'alt': 'json', 'nid': 'TgMKoQxyWtk', 'hl': 'en_US', 'dv': 0, 'tier': 'aa'}})
(response was: '{"error":{"errors":[{"domain":"global","reason":"badRequest","message":"Bad Request"}],"code":400,"message":"Bad Request"}}')

Songs with "" in their title/artist cause issues with SQLite

SQLITE WRITE ERROR:
near "Weird": syntax error
Exception in thread Thread-4:
Traceback (most recent call last):
File "C:\Python27\lib\threading.py", line 810, in __bootstrap_inner
self.run()
File "C:\Python27\lib\threading.py", line 763, in run
self.__target(*self.__args, **self.__kwargs)
File "C:/Users/Grant/IdeaProjects/GPMSongRequest/Run.py", line 180, in main
runcommand(command, cmdarguments, user)
File "C:/Users/Grant/IdeaProjects/GPMSongRequest/Run.py", line 142, in runcommand
torun = commands[item][0](commands[item][1], commands[item][2])
File "C:\Users\Grant\IdeaProjects\GPMSongRequest\SongRequest.py", line 298, in songrequest
return user + " >> Added: " + songtitle + " to the queue. ID: " + getnewentry()
File "C:\Users\Grant\IdeaProjects\GPMSongRequest\SongRequest.py", line 83, in getnewentry
return(str(result[0]))
TypeError: 'NoneType' object has no attribute 'getitem'

Typing !sr with nothing else crashes bot

Traceback (most recent call last):
File "C:\Program Files\Python37\lib\threading.py", line 917, in _bootstrap_inner
self.run()
File "C:\Program Files\Python37\lib\threading.py", line 865, in run
self._target(*self._args, **self._kwargs)
File "Run.py", line 185, in console
runcommand(command, cmdarguments, "CONSOLE", True)
File "Run.py", line 106, in runcommand
output = eval(cmd + '(' + arg1 + ', ' + arg2 + ')')
File "", line 1, in
File "C:\Users\Grant\Documents\rxbot\RxBot\SongRequest.py", line 371, in songrequest
if validators.url(requestArgs[0]):
IndexError: list index out of range

PYTUBE / YOUTUBE REQUESTS NOT WORKING

This is a known error, presumably YouTube changed how their encoding works and thus Pytube is unable to decipher it. Youtube requests will not work until further notice.

Youtube error

ERROR: This video is unavailable.
Exception in thread Thread-2:
Traceback (most recent call last):
File "C:\Program Files\Python37\lib\site-packages\youtube_dl\YoutubeDL.py", line 796, in extract_info
ie_result = ie.extract(url)
File "C:\Program Files\Python37\lib\site-packages\youtube_dl\extractor\common.py", line 530, in extract
ie_result = self._real_extract(url)
File "C:\Program Files\Python37\lib\site-packages\youtube_dl\extractor\youtube.py", line 2115, in _real_extract
raise ExtractorError(error_message, expected=True)
youtube_dl.utils.ExtractorError: This video is unavailable.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\Program Files\Python37\lib\site-packages\pafy\backend_youtube_dl.py", line 38, in _fetch_basic
self._ydl_info = ydl.extract_info(self.videoid, download=False)
File "C:\Program Files\Python37\lib\site-packages\youtube_dl\YoutubeDL.py", line 819, in extract_info
self.report_error(compat_str(e), e.format_traceback())
File "C:\Program Files\Python37\lib\site-packages\youtube_dl\YoutubeDL.py", line 624, in report_error
self.trouble(error_message, tb)
File "C:\Program Files\Python37\lib\site-packages\youtube_dl\YoutubeDL.py", line 594, in trouble
raise DownloadError(message, exc_info)
youtube_dl.utils.DownloadError: ERROR: This video is unavailable.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\Program Files\Python37\lib\threading.py", line 917, in _bootstrap_inner
self.run()
File "C:\Program Files\Python37\lib\threading.py", line 865, in run
self._target(*self._args, **self._kwargs)
File "C:/Users/Grant/IdeaProjects/rxbot3/Run.py", line 164, in tick
nowplaying = srcontrol.playsong()
File "C:\Users\Grant\IdeaProjects\rxbot3\SongRequest.py", line 168, in playsong
yt = pafy.new(self.songkey, basic=True, size=False)
File "C:\Program Files\Python37\lib\site-packages\pafy\pafy.py", line 124, in new
return Pafy(url, basic, gdata, size, callback, ydl_opts)
File "C:\Program Files\Python37\lib\site-packages\pafy\backend_youtube_dl.py", line 29, in init
super(YtdlPafy, self).init(*args, **kwargs)
File "C:\Program Files\Python37\lib\site-packages\pafy\backend_shared.py", line 96, in init
self._fetch_basic()
File "C:\Program Files\Python37\lib\site-packages\pafy\backend_youtube_dl.py", line 41, in _fetch_basic
raise IOError(str(e).replace('YouTube said', 'Youtube says'))
OSError: ERROR: This video is unavailable.

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.