jprichardson / jprichardson/node-google

Module stopped working

Open
#42 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
456
Forks
115
PR merge metrics
No merged PRs in 30d

Description

Hey,
Thank you for this excellent module, Have been working for my app perfectly from the last 2 years.

But, few days ago, it stopped working and i am getting this error:

/Users/ayushnarula/Desktop/test.js:9
for (var i = 0; i < res.links.length; ++i) {
^

TypeError: Cannot read property 'length' of undefined
    at /Users/ayushnarula/Desktop/test.js:9:32
    at Request._callback (/Users/ayushnarula/node_modules/google/lib/google.js:57:7)
    at Request.self.callback (/Users/ayushnarula/node_modules/google/node_modules/request/main.js:122:22)
    at emitTwo (events.js:87:13)
    at Request.emit (events.js:172:7)
    at Request.<anonymous> (/Users/ayushnarula/node_modules/google/node_modules/request/main.js:661:16)
    at emitOne (events.js:82:20)
    at Request.emit (events.js:169:7)
    at IncomingMessage.<anonymous> (/Users/ayushnarula/node_modules/google/node_modules/request/main.js:623:14)
    at emitNone (events.js:72:20)  

Wondering if google had changed its html results structure

Thanks again,
Cheers

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the failure from test.js:9 and inspect the callback in lib/google.js:57, focusing on the response shape returned by Google. Compare the current HTML/result structure with the parser's expected res.links value; done means the module handles the current response and the example no longer throws.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, node.js
Domain
search
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.