Skip to content

Commit

Permalink
Merge pull request #314 from hearchco/as/fix/ddg
Browse files Browse the repository at this point in the history
fix(duckduckgo): dead code with linting problem
  • Loading branch information
aleksasiriski authored May 28, 2024
2 parents a2b46e5 + 98a4b60 commit 146b103
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions src/search/engines/duckduckgo/duckduckgo.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package duckduckgo

import (
"context"
"fmt"
"strconv"
"strings"

Expand Down Expand Up @@ -39,16 +38,13 @@ func (e Engine) Search(ctx context.Context, query string, relay *bucket.Relay, o
col.OnHTML(dompaths.ResultsContainer, func(e *colly.HTMLElement) {
var linkText, linkScheme, titleText, descText string
var hrefExists bool
var rrank int

pageIndex := _sedefaults.PageFromContext(e.Request.Ctx, Info.Name)
page := pageIndex + options.Pages.Start + 1

e.DOM.Children().Each(func(i int, row *goquery.Selection) {
switch i % 4 {
case 0:
rankText := strings.TrimSpace(row.Children().First().Text())
fmt.Sscanf(rankText, "%d", &rrank)
var linkHref string
linkHref, hrefExists = row.Find(dompaths.Link).Attr("href")
if strings.Contains(linkHref, "https") {
Expand Down

0 comments on commit 146b103

Please sign in to comment.