google-sr-selectors
Advanced tools
Comparing version 0.0.3 to 1.0.0
@@ -18,4 +18,6 @@ declare const OrganicSearchSelector: { | ||
word: string; | ||
examples: string; | ||
definitions: string; | ||
definition: string; | ||
definitionPartOfSpeech: string; | ||
definitionExample: string; | ||
definitionSynonyms: string; | ||
}; | ||
@@ -22,0 +24,0 @@ declare const TimeSearchSelector: { |
@@ -44,7 +44,13 @@ "use strict"; | ||
var DictionarySearchSelector = { | ||
audio: "audio:first", | ||
// use attr('src') to get the audio url | ||
audio: "h3.zBAuLc.l97dzf > div.BNeawe > audio", | ||
phonetic: "span > div.BNeawe.tAd8D.AP7Wnd", | ||
word: "h3 > div.BNeawe.deIvCb.AP7Wnd", | ||
examples: "div.v9i61e > div.BNeawe > span.r0bn4c.rQMQod", | ||
definitions: "div.v9i61e > div.BNeawe.s3v9rd.AP7Wnd:not(:has(span.r0bn4c.rQMQod))" | ||
word: "span.lU7jec > h3.zBAuLc.l97dzf > div.BNeawe", | ||
// there can be multiple definitions | ||
// use definitionPartOfSpeech as reference to how many definitions there are | ||
// there are no reliable way other than that to get definitions | ||
definition: "div.v9i61e > div.BNeawe.s3v9rd.AP7Wnd:not(:has(span))", | ||
definitionPartOfSpeech: "div.Ap5OSd > div.BNeawe.s3v9rd.AP7Wnd > span.r0bn4c.rQMQod", | ||
definitionExample: "div.v9i61e > div.BNeawe.s3v9rd.AP7Wnd:has(span)", | ||
definitionSynonyms: "div:not(.v9i61e):not(.Ap5OSd) > div.BNeawe.s3v9rd.AP7Wnd > span.r0bn4c.rQMQod" | ||
}; | ||
@@ -51,0 +57,0 @@ var TimeSearchSelector = { |
{ | ||
"name": "google-sr-selectors", | ||
"version": "0.0.3", | ||
"version": "1.0.0", | ||
"description": "Html selectors for google search result pages.", | ||
"repository": "https://github.com/typicalninja/google-sr", | ||
"homepage": "https://g-sr.vercel.app/google/selectors", | ||
"homepage": "https://github.com/typicalninja/google-sr", | ||
"main": "dist/index.js", | ||
@@ -8,0 +8,0 @@ "types": "dist/index.d.ts", |
@@ -14,8 +14,2 @@ # google-sr-selectors | ||
* View documentation [here](https://g-sr.vercel.app/google/selectors) | ||
* Come chat with us on [our discord](https://discord.gg/ynwckXS9T2) | ||
Please note that the included selectors are intended for the **non-Javascript** version of Google Search page. | ||
@@ -26,19 +20,11 @@ These were obtained by appending `&gbv=1` to the regular query link. | ||
## What are selectors? | ||
# Supported types | ||
Selectors form the backbone of packages like google-sr. These are predefined strings that outline the structure of specific HTML code representing the desired value. | ||
By utilizing selectors, we gain the ability to parse the HTML and precisely extract the intended information. | ||
The package currently only supports a limited amount search result types | ||
This package exports the selectors used to extract search result values from, google html page data we receive. | ||
Offered for purposes of contributors and other developers interested in parsing raw google search html. | ||
See the [api docs](https://github.com/typicalninja/google-sr/blob/master/packages/google-sr-selectors/API.md) for more information. | ||
## Supported types | ||
The package currently only supports a limited amount of selectors | ||
You can view them in the [documentation](https://g-sr.vercel.app/google/selectors) | ||
🌟 Suggest more to be added [here](https://github.com/typicalninja/google-sr/discussions/new?category=ideas) | ||
## Related projects 🥂 | ||
# Related projects 🥂 | ||
@@ -49,12 +35,14 @@ * [google-sr](https://g-sr.vercel.app/google/sr) - Simple tool to programmatically get google search results | ||
## Disclaimer | ||
# Disclaimer | ||
This is not sponsored, supported, or affiliated with Google Inc. | ||
The source code within this repository is intended solely for educational purposes. | ||
Unlike the conventional recommendation of using the Google API, this module scrapes the Google search result page (which might potentially infringe upon Google's terms of service). | ||
The author (typicalninja) & contributors takes **no** responsibility for any issues that arise from misuse, such as IP blocking by Google. Your discretion in usage is advised. | ||
The source code within this repository is intended solely for educational & research purposes. | ||
## License | ||
The author (typicalninja) & contributors takes **NO** responsibility for any issues that arise from misuse, such as IP blocking by Google. Your discretion in usage is advised. | ||
# License | ||
This repository and the code inside it is licensed under the Apache-2.0 License. Read [LICENSE](./LICENSE) for more information. |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
21562
8
146
0
45