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

Uploaded Python 3

File details

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

File metadata

  • Download URL: linux_do_connect_token-0.0.0b3.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.0b3.tar.gz
Algorithm Hash digest
SHA256 005c33aab3e29461858932113c3b112028de84468c39ea34e05358da76fbb510
MD5 4c43a5a40df249c734e0384e411168cc
BLAKE2b-256 58e156abb8560faba8ae6c8dc9a89280c71e009bcde2cce33a7b122b018781dc

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for linux_do_connect_token-0.0.0b3-py3-none-any.whl
Algorithm Hash digest
SHA256 ae9477d74e20bead7fe653b2e14caaae1cf2d1083c5d377fb36f56fe1ab07545
MD5 9e1605cc32176b8b640f799aa599df2d
BLAKE2b-256 b97e177284730b932bf1ce72c7953b96753b746d40df7089b39318b779ff6379

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