-
Notifications
You must be signed in to change notification settings - Fork 114
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Empty result (News for ...) #32
Comments
This script considers the entire "Top Card" (in this case "In The News") as the first result ( links[0] ). So links[0].link would be null because it cannot figure out how to parse all this. var i=0;
while(links[i].link == null)
i++;
console.log(links[i].link); The second fix I have discovered sort of needs its own "Issue" but i will include it here for you anyway. To handle a youtube video as the first result (probably other things too). This one does require modifying the module's code @ lib/google.js //Handle YoutubeVideo as TopCard.
if (!qsObj['/url?q'])
qsObj = querystring.parse($(elem).find('a').attr('href')) |
For anyone looking for a solution to this issue - I've made a fork that changes the item selector to always skip cards https://github.com/BTMPL/node-google the only affected line is https://github.com/BTMPL/node-google/blob/master/lib/google.js#L8 |
@BTMPL Thanks, but that still doesn't fix the issue. Test Keyword Lenovo "00AE912" |
Works fine for me. Produces this result (which matches with my human google search): The N2225 and N2226 SAS/SATA HBAs are low-cost, high-performance host bus adapters for high-performance connectivity between System x® servers and tape drives and RAID storage systems. The N2225 provides two x4 external mini-SAS HD connectors with eight lanes of 12 Gbps SAS. The N2226 provides four x4 external mini-SAS HD connectors with 16 lanes of 12 Gbps SAS. Make sure you are calling it somewhat like this (my example code):
Actually this was adapted from v1.0 which I see now on the homepage theres example code to use the callback and next function better than I have done. Since I only need 1 result. But since mines not broke I wont fix it, I'll leave that up to you. |
Its not happening for almost all searches:
I'm calling it like so:
|
I Guess your google is different in your country or with those request options. im sure you can figure it out. |
When you search for
hello lyrics
, you get this empty result.The text was updated successfully, but these errors were encountered: