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.0b4.tar.gz (2.3 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.0b4-py3-none-any.whl (3.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: linux_do_connect_token-0.0.0b4.tar.gz
  • Upload date:
  • Size: 2.3 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.0b4.tar.gz
Algorithm Hash digest
SHA256 70453adbcbf0c565b24d9ef72b1fbda9434b180bfa1905b26660b76d1f7425b9
MD5 d474fb5c2dc4eb0f14db95788954d30d
BLAKE2b-256 9c7d6dcb2b833e8a533c2287d1eee4825078e21771d3e226afcc0914777b91e3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for linux_do_connect_token-0.0.0b4-py3-none-any.whl
Algorithm Hash digest
SHA256 4808e3e78bcc3ad99d403607602a9ff4b289b7f7b9ffa06a933b2ca4d0d34abb
MD5 78178ce7b99b9447d60088382e5f36e5
BLAKE2b-256 1aa852e5d140618cbf9e2525c5e8d2ae18dea07d99b6d3d0536f11e8ffaf1f62

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