Skip to main content

A helper library to authenticate with connect.linux.do and retrieve auth.session-token

Project description

Linux Do Connect Token

A helper library to authenticate with connect.linux.do and retrieve auth.session-token


Usage

Get Sessions

import os
from linux_do_connect import get_auth_session

connect_cookie = os.getenv("_t")
session = get_auth_session(
    connect_cookie,
    timeout=30,
    proxies={"https": "http://127.0.0.1:7890"}
)
print(session.cookies.get("auth.session-token"))

Custom Session

import os
from curl_cffi import requests
from linux_do_connect import LinuxDoConnect

connect_cookie = os.getenv("_t")
session = requests.Session()

client = LinuxDoConnect(session)
token = client.get_token(
    connect_cookie,
    timeout=30,
    proxies={"https": "http://127.0.0.1:7890"}
)
print(token)

Get the _t Cookie

  1. Open InPrivate page(Because token refresh)
  2. Log in to linux.do
  3. Open DevTools by pressing F12
  4. Go to the Application tab
  5. Expand Cookies in the left sidebar and select linux.do
  6. Find the _t cookie in the list
  7. Copy its value for later use
  8. Close InPrivate page(Dont logout linux.do)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

linux_do_connect_token-0.0.0b5.tar.gz (2.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

linux_do_connect_token-0.0.0b5-py3-none-any.whl (3.5 kB view details)

Uploaded Python 3

File details

Details for the file linux_do_connect_token-0.0.0b5.tar.gz.

File metadata

  • Download URL: linux_do_connect_token-0.0.0b5.tar.gz
  • Upload date:
  • Size: 2.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.2.1 CPython/3.14.2 Linux/6.11.0-1018-azure

File hashes

Hashes for linux_do_connect_token-0.0.0b5.tar.gz
Algorithm Hash digest
SHA256 d936195073ffd31ece0fade3391a2aceb9b7140b94472eb607d47bdc76784df4
MD5 2fb211e156996e39d36a1c5b5d79a24f
BLAKE2b-256 17297b98ccfb11060d3e90bd7bc122bc8be4b64e3f515b31f67bbe5a11caafc3

See more details on using hashes here.

File details

Details for the file linux_do_connect_token-0.0.0b5-py3-none-any.whl.

File metadata

File hashes

Hashes for linux_do_connect_token-0.0.0b5-py3-none-any.whl
Algorithm Hash digest
SHA256 0ad964d60fd92c963ab90f917aaf2297058638bcc2fab572181c6dc996d307bf
MD5 df624e689a5ed509551a0bb8e4bb1a1c
BLAKE2b-256 945fd07dc38939d4b2838fcd22619f418a42253f35d74accabd801ccbe5d6ac6

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page