Merge pull request #117 from berkaltiok/patch-1
Create clear cookies function
This commit is contained in:
commit
7393ab5136
1 changed files with 4 additions and 0 deletions
4
auth.go
4
auth.go
|
|
@ -385,6 +385,10 @@ func (s *Scraper) SetCookies(cookies []*http.Cookie) {
|
||||||
s.client.Jar.SetCookies(twURL, cookies)
|
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 {
|
func (s *Scraper) sign(method string, ref *url.URL) string {
|
||||||
m := make(map[string]string)
|
m := make(map[string]string)
|
||||||
m["oauth_consumer_key"] = appConsumerKey
|
m["oauth_consumer_key"] = appConsumerKey
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue