Skip to content
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

Хранение cookies с разделением по доменам #72

Closed
userlond opened this issue Oct 19, 2014 · 2 comments
Closed

Comments

@userlond
Copy link

В текущей версии grab куки хранятся в виде dict вида имя=>значение.

Пожалуйста, реализуйте хранение куков, более приближенную к модели браузера, с сохранением информации о папке, домене и т.д.

{
    "domain": ".github.com",
    "expirationDate": 1476761637,
    "hostOnly": false,
    "httpOnly": false,
    "name": "_ga",
    "path": "/",
    "secure": false,
    "session": false,
    "storeId": "0",
    "value": "GA1.2.123456.78910",
    "id": 1
}

Столкнулся с хитрым сайтом на Битриксе, который не отдает контент, если метод обработки куков отличается от браузерного (это наиболее вероятная причина, скажите механизм защиты, если кто знает :) ).

// English version

Current grab saves cookies using python dict with structure like name => value.

Please, implement cookie storage, which is alike browser model. I.e. with info about path, domain, etc.

P.S. I'v faced with complicated site based on Bitrix, which didn't gave me content if cookie handling is differs from browser's cookie-storage model (is it a real reasщт, maybe anybody may share details of this protection :) ).

Заранее спасибо / Thanks a lot

@lorien
Copy link
Owner

lorien commented Oct 19, 2014

Hey bro :)
Try recent Grab version from repo - there is refactored cookies module that supports extended cookies attributes. I do not remember if I've documented this feature in new English documentation. Try to grep docs2/ directory content for "cookie" keyword.

@userlond
Copy link
Author

Big thanks for fast reply. I'm in deadline now so will try solution later :)

New cookie-storage way is documented here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants