Zirak / SO-ChatBot

Other
124 stars 60 forks source link

You Tubes #234

Closed rlemon closed 9 years ago

rlemon commented 9 years ago

The You Tubes is broken.

API Is deprecated.

Flames everywhere!!!!

Help!

Zirak commented 9 years ago

Youtube API v2 has been officially deprecated, replaced by v3. This brings with it a big problem: Querying v3 requries an API key.

Registering it for myself isn't too big of a deal, but of course I can't just use the key in the bot's source files or it'll be abused beyond oblivion. Likewise for making a proxy server.

That leaves the question what'll be the best way of shipping the bot. To this point I fervently tried to avoid any bit of a config file so the bot can really be plug-n-play. It's possible to disable the youtube command unless an API key is supplied (maybe via localStorage?), but that's weak - how will the forkers using WebDrive supply it, for instance?

A config file embedded during the build is out of the question, since that requires building the bot yourself.

I currently see no way around it, which is a shame. As the main forkers (that I know of), @Elusive138, @allquixotic, thoughts? Maybe you have an alternative idea?

awalgarg commented 9 years ago

@Zirak just google with site:youtube.com?

@Zirak have the site:youtube thing as default, and if an api key is found in localStorage, use it instead.

allquixotic commented 9 years ago

I can add a bit of code to so-chatbot-driver to accept the API key as a command line parameter, and stuff it into localStorage using WebDriver. No biggie for us, I think. Do what you guys want.

BobVul commented 9 years ago

@allquixotic If we're going that path, might as well create a proper config file and import the whole thing. Keep that as part of the driver.

Considering it's supposed to be run in-browser, perhaps add some kind of config editor dialog to the main bot? Could be as simple as this, or even just a floating textarea... then we can just have default/blank values and anyone can easily add a key as needed.

Zirak commented 9 years ago

So far I like @awalGarg's suggestion best, as it's in the spirit of /mdn. Any reason we shouldn't do it?

BobVul commented 9 years ago

Should at least make it youtube.com/watch to exclude the user pages. I wonder if it's worth adding OR site:youtu.be... probably not.