Skip to content
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

Search Videos #41

Open
pokatomnik opened this issue Apr 4, 2016 · 3 comments
Open

Search Videos #41

pokatomnik opened this issue Apr 4, 2016 · 3 comments

Comments

@pokatomnik
Copy link

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.

@talysl
Copy link

talysl commented May 5, 2016

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! 👍

@pokatomnik
Copy link
Author

pokatomnik commented May 5, 2016

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.

@knoxcard
Copy link

knoxcard commented Oct 4, 2018

@pokatomnik - you have to close the issue since you opened it. Please close it when you can to clear up the issues backlog. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants