Separate test package

This commit is contained in:
Alexander Sheiko 2021-12-07 10:18:01 +02:00
parent 55a0c83804
commit 4c9f06806a
7 changed files with 58 additions and 44 deletions

View file

@ -3,13 +3,14 @@ package twitterscraper
import (
"crypto/tls"
"errors"
"golang.org/x/net/proxy"
"net"
"net/http"
"net/url"
"strings"
"sync"
"time"
"golang.org/x/net/proxy"
)
// Scraper object
@ -56,6 +57,11 @@ func New() *Scraper {
}
}
// IsGuestToken check if guest token not empty
func (s *Scraper) IsGuestToken() bool {
return s.guestToken != ""
}
// SetSearchMode switcher
func (s *Scraper) SetSearchMode(mode SearchMode) *Scraper {
s.searchMode = mode