clips / clips/pattern

Support for session?

Open
#77 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
8.9k
Forks
1.6k
PR merge metrics
No merged PRs in 30d

Description

Hi,

I'm wondering if there is existing or planned support for sessions (i.e. reusing connections, support for cookies). When crawling some sites that requires logins session support could really come to help. In current web module I couldn't find a way to pass in new urllib2 opener with cookie lib support (https://github.com/clips/pattern/blob/master/pattern/web/__init__.py#L361) ; however it's mentioned in doc of HTTP301Redirect exception.

Is there an existing, proper way to add support for session and possibly persist connections?

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with pattern/web/init.py around line 361 and the HTTP301Redirect exception documentation mentioned in the issue. Review how urllib2 openers and cookie support are currently handled, then define the intended session and connection-persistence behavior before identifying tests or other entry points. Done would require an agreed, testable session API, but the issue does not specify one.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
networking
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.