-
Notifications
You must be signed in to change notification settings - Fork 139
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
support tbs parameter #79
base: master
Are you sure you want to change the base?
Conversation
Are there any parameters to tbs that don't start with |
Here are some common tbs filter options: qdr: Time filter (e.g., h for hour, d for day, w for week, m for month, y for year) |
Interesting! Can you add these to the README? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the PR! I've added this review so that I can keep track of pull requests that are ready to be merged.
@@ -25,6 +25,16 @@ In addition, you can change the language google searches in. For example, to get | |||
from googlesearch import search | |||
search("Google", lang="fr") | |||
``` | |||
|
|||
### Time-Based Search (tbs) Parameter | |||
You can also refine search results based on time. The tbs parameter allows you to filter results by various time ranges. For instance, to get results from the past hour, use `qdr:h`, or for results from the past year, use `qdr:y`. Here's how you can use the tbs parameter: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you add information about non-qdr options?
Hi everyone, I've noticed that some filters modify the HTML structure in ways that might break the scraping process. From what I understand (though I might be mistaken), it seems that only the time filter (qdr) and the language filter (sur) keep the search functionality working as expected. Thanks a lot. |
Time-Based Search (tbs) Parameter
You can also refine search results based on time. The tbs parameter allows you to filter results by various time ranges. For instance, to get results from the past hour, use qdr:h, or for results from the past year, use qdr:y. Here's how you can use the tbs parameter: