Merge pull request #117 from berkaltiok/patch-1

Create clear cookies function
This commit is contained in:
Nomadic 2023-07-06 15:50:00 +03:00 committed by GitHub
commit 7393ab5136

View file

@ -385,6 +385,10 @@ func (s *Scraper) SetCookies(cookies []*http.Cookie) {
s.client.Jar.SetCookies(twURL, cookies)
}
func (s *Scraper) ClearCookies() {
s.client.Jar, _ = cookiejar.New(nil)
}
func (s *Scraper) sign(method string, ref *url.URL) string {
m := make(map[string]string)
m["oauth_consumer_key"] = appConsumerKey