oftn-oswg / oftn-bot

State of the art IRC bot library & bot for Node.js
http://wg.oftn.org/#projects
Other
90 stars 29 forks source link

feelinglucky broken (affects !mdn and !g) #55

Open brigand opened 8 years ago

brigand commented 8 years ago

Here's the error:

TypeError: Cannot read property 'results' of null
    at IncomingMessage.<anonymous> (/home/node/lib/feelinglucky/index.js:19:44)
    at IncomingMessage.EventEmitter.emit (events.js:117:20)
    at _stream_readable.js:920:16
    at process._tickCallback (node.js:415:13)
brigand commented 8 years ago

Here's api response:

{"responseData": null, "responseDetails": "The Google Web Search API is no longer available. Please migrate to the Google Custom Search API (https://developers.google.com/custom-search/)", "responseStatus": 403}

eligrey commented 8 years ago

https://news.ycombinator.com/item?id=11625633 :frowning:

We either need to reverse engineer the google.com internal JS API (used by https://www.google.com/#q=test) or resort to scraping HTML. Also, automated use will probably trigger CAPTCHAs as explained at https://news.ycombinator.com/item?id=11625927.

brigand commented 8 years ago

Maybe useful https://support.google.com/customsearch/answer/2631040?hl=en

For web scraping, there's 'google' on npm.

yorickvP commented 8 years ago

I read some API docs, they have a JSON API

yorickvP commented 8 years ago

MDN could maybe be fixed using https://developer.mozilla.org/en-US/docs/MDN/Contribute/Tools/Search

hagb4rd commented 8 years ago

Feeling Ducky! :grin:

Created a replacement. Works the same Googles Lucky Search used to.

Greetz!

Pull Request here:

60