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. Log in to linux.do
  2. Open DevTools by pressing F12
  3. Go to the Application tab
  4. Expand Cookies in the left sidebar and select linux.do
  5. Find the _t cookie in the list
  6. Copy its value for later use

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

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for linux_do_connect_token-0.0.0b2.tar.gz
Algorithm Hash digest
SHA256 e203b77a6785c260e452501b5206cc6f08f41e73347c3e33c3a5f46eff7cbb8a
MD5 796509b70d803bc3fa53ac6dc9281b0e
BLAKE2b-256 fa756e65b74b74b45db4892fce4a06e7814a5517a228ee7d443638f670e76b34

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for linux_do_connect_token-0.0.0b2-py3-none-any.whl
Algorithm Hash digest
SHA256 65a0e078570159195a30b8ae32a6c9146b78c4618430b7d87a3be5b52159b996
MD5 c5ac2038213e93b3706f81f292f3c09d
BLAKE2b-256 48163da504a801678cdb1a0003faeb1a4653027e6362f2133f641f342894913e

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