Skip to content

Commit

Permalink
update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
Xatta-Trone committed Jan 31, 2024
1 parent 6bde6e6 commit a2f5619
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
10 changes: 9 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,9 @@
# thesarus-scrapper
# thesaurus-scrapper

Testing routes:

| Source | Original | Scrapper |
|:----------:|:-------------:|:------:|
| Google | [https://www.google.com/search?q=abide+defiftion&](https://www.google.com/search?q=abide+defiftion&)|[https://thesaurus.gre-sentence-equivalence.com/g/abide](https://thesaurus.gre-sentence-equivalence.com/g/abide)|
| Thesaurus | [https://www.thesaurus.com/browse/abide](https://www.thesaurus.com/browse/abide)|[https://thesaurus.gre-sentence-equivalence.com/w/abide](https://thesaurus.gre-sentence-equivalence.com/w/abide)|
| Merriam-Webster | [https://www.merriam-webster.com/thesaurus/abide](https://www.merriam-webster.com/thesaurus/abide)|[https://thesaurus.gre-sentence-equivalence.com/mw/abide](https://thesaurus.gre-sentence-equivalence.com/mw/abide)|
4 changes: 2 additions & 2 deletions scrapper/thesaurus.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ func GetResult(word string) (WordResponse, error) {
// tempDef := []string{}
StartURLs := "https://www.thesaurus.com/browse/" + word

ctx, cancel := chromedp.NewExecAllocator(context.Background(), append(chromedp.DefaultExecAllocatorOptions[:], chromedp.Flag("headless", false))...)
ctx, cancel := chromedp.NewExecAllocator(context.Background(), append(chromedp.DefaultExecAllocatorOptions[:], chromedp.Flag("headless", true))...)
defer cancel()
ctx, cancel = chromedp.NewContext(ctx)
defer cancel()
Expand Down Expand Up @@ -60,7 +60,7 @@ func GetResult(word string) (WordResponse, error) {
}
return length;
})()`, checkRootXpath), &checkRoot))

if err != nil {
fmt.Println(err)
return finalResult, err
Expand Down

0 comments on commit a2f5619

Please sign in to comment.