-
-
Notifications
You must be signed in to change notification settings - Fork 303
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature/#236 cookies #242
Feature/#236 cookies #242
Conversation
README.md
Outdated
#### CLI | ||
|
||
```sh | ||
ferret --cdp-keep-cookies my-query.fql |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove left spaces pls
ferret --cdp-keep-cookies my-query.fql
pkg/drivers/cdp/helpers.go
Outdated
switch cookie.SameSite { | ||
case http.SameSiteLaxMode: | ||
sameSite = network.CookieSameSiteLax | ||
break |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
break
can be removed, because break
is a default behavior of switch-case
switch c.SameSite { | ||
case network.CookieSameSiteLax: | ||
sameSite = http.SameSiteLaxMode | ||
break |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
break
can be removed, because break
is a default behavior of switch-case
pkg/drivers/cookie.go
Outdated
|
||
MaxAge int `json:"max_age"` | ||
Secure bool `json:"secure"` | ||
HttpOnly bool `json:"http_only"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use HTTP
instead of Http
pkg/drivers/cdp/helpers.go
Outdated
cookie.Expires = time.Now().Add(time.Duration(24) + time.Hour) | ||
} | ||
|
||
normalizedUrl := normalizeCookieUrl(url) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use normalizedURL
instead of normalizedUrl
examples/cookies.go
Outdated
|
||
import ( | ||
"context" | ||
"encoding/json" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unused imports here
examples/cookies.go
Outdated
) | ||
|
||
return program.Run(ctx) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here go fmt
adds a new line
Codecov Report
@@ Coverage Diff @@
## master #242 +/- ##
========================================
- Coverage 56.7% 56.3% -0.5%
========================================
Files 189 189
Lines 5696 5749 +53
========================================
+ Hits 3231 3235 +4
- Misses 2114 2164 +50
+ Partials 351 350 -1 |
* Added KeepCookies option to CDP driver * Added LoadDocumentParams * Added COOKIE_GET and COOKIE_SET methods
author Tim Voronov <[email protected]> 1552622815 -0400 committer Владимир Фетисов <[email protected]> 1554919032 +0300 parent b45f889 author Tim Voronov <[email protected]> 1552622815 -0400 committer Владимир Фетисов <[email protected]> 1554919029 +0300 Updated style template Feature/MontFerret#236 cookies (MontFerret#242) * Added KeepCookies option to CDP driver * Added LoadDocumentParams * Added COOKIE_GET and COOKIE_SET methods Updated CHANGELOG Updated nav example fix order of arguments (MontFerret#269) Updated RAND function (MontFerret#271) * Updated RAND function * renamed a func Linter Cleanup (MontFerret#276) * linter cleanup * fix default case Bump github.com/mafredri/cdp from 0.22.0 to 0.23.0 (MontFerret#278) Bumps [github.com/mafredri/cdp](https://github.com/mafredri/cdp) from 0.22.0 to 0.23.0. - [Release notes](https://github.com/mafredri/cdp/releases) - [Commits](mafredri/cdp@v0.22.0...v0.23.0) Signed-off-by: dependabot[bot] <[email protected]> fix diff
* Added KeepCookies option to CDP driver * Added LoadDocumentParams * Added COOKIE_GET and COOKIE_SET methods
author Tim Voronov <[email protected]> 1552622815 -0400 committer Владимир Фетисов <[email protected]> 1554919032 +0300 parent b45f889 author Tim Voronov <[email protected]> 1552622815 -0400 committer Владимир Фетисов <[email protected]> 1554919029 +0300 Updated style template Feature/MontFerret#236 cookies (MontFerret#242) * Added KeepCookies option to CDP driver * Added LoadDocumentParams * Added COOKIE_GET and COOKIE_SET methods Updated CHANGELOG Updated nav example fix order of arguments (MontFerret#269) Updated RAND function (MontFerret#271) * Updated RAND function * renamed a func Linter Cleanup (MontFerret#276) * linter cleanup * fix default case Bump github.com/mafredri/cdp from 0.22.0 to 0.23.0 (MontFerret#278) Bumps [github.com/mafredri/cdp](https://github.com/mafredri/cdp) from 0.22.0 to 0.23.0. - [Release notes](https://github.com/mafredri/cdp/releases) - [Commits](mafredri/cdp@v0.22.0...v0.23.0) Signed-off-by: dependabot[bot] <[email protected]> fix diff
Closes #236