diff --git a/README.md b/README.md index 7720b35..65ead47 100644 --- a/README.md +++ b/README.md @@ -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)| \ No newline at end of file diff --git a/scrapper/thesaurus.go b/scrapper/thesaurus.go index 9518022..1634dff 100644 --- a/scrapper/thesaurus.go +++ b/scrapper/thesaurus.go @@ -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() @@ -60,7 +60,7 @@ func GetResult(word string) (WordResponse, error) { } return length; })()`, checkRootXpath), &checkRoot)) - + if err != nil { fmt.Println(err) return finalResult, err