node-google
node-google copied to clipboard
Search Videos
Very useful module, thank you for it!
How can I find videos only? I know that I have to add tbm=vid in GET like a
google.requestOptions = { qs : {'tbm' : 'vid'} };
But It is not working.
Hi @pokatomnik !
I don't know if you are still interested, but the solution is a little bit silly hahaha
open this file ../node-modules/google/lib/google.js in your app, then change the link in the following line:
var URL = 'https://www.google.%s/search?hl=%s&q=%s&start=%s&sa=N&num=%s&ie=UTF-8&oe=UTF-8&gws_rd=ssl'
Including the type of search that you want to perform in the end of the url like that:
var URL = 'https://www.google.%s/search?hl=%s&q=%s&start=%s&sa=N&num=%s&ie=UTF-8&oe=UTF-8&gws_rd=ssl&tbm=vid'
Here are the codes: For video searches, include: &tbm=vid For News: &tbm=nws (you will have also to change the variable descSel from 'div.s' to 'div.st' in this case)
For Images, Maps and others, I do not know, at least not yet!
Good Luck! :+1:
Thank you, talysl, I've already solved this same way. I was looking for more clear way, I did not want to hack this module. But what done is done. @jprichardson you may close the issue as you need.
@pokatomnik - you have to close the issue since you opened it. Please close it when you can to clear up the issues backlog. Thanks!