chore: update workflows and docs

This commit is contained in:
vladkens
2026-07-21 19:56:47 +03:00
parent f4423d6418
commit 22fe570513
4 changed files with 24 additions and 12 deletions
+1
View File
@@ -0,0 +1 @@
* @vladkens
+9 -5
View File
@@ -5,16 +5,20 @@ on:
branches: [main]
tags: ["v*"]
permissions:
contents: read
jobs:
test:
runs-on: ubuntu-latest
continue-on-error: ${{ matrix.python-version == '3.15' }}
strategy:
fail-fast: false
matrix:
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14", "3.15"]
steps:
- uses: actions/checkout@v6
- uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
- uses: actions/checkout@v7
- uses: astral-sh/setup-uv@11f9893b081a58869d3b5fccaea48c9e9e46f990 # v8.3.2
with:
python-version: ${{ matrix.python-version }}
@@ -30,8 +34,8 @@ jobs:
contents: write
id-token: write
steps:
- uses: actions/checkout@v6
- uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
- uses: actions/checkout@v7
- uses: astral-sh/setup-uv@11f9893b081a58869d3b5fccaea48c9e9e46f990 # v8.3.2
- name: Check pyproject.toml version matches tag
run: |
+6 -7
View File
@@ -2,22 +2,21 @@ name: pr
on:
pull_request:
pull_request_target:
types: [opened, reopened]
permissions: read-all
permissions:
contents: read
jobs:
test:
if: github.event_name == 'pull_request'
runs-on: ubuntu-latest
continue-on-error: ${{ matrix.python-version == '3.15' }}
strategy:
fail-fast: false
matrix:
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14", "3.15"]
steps:
- uses: actions/checkout@v6
- uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
- uses: actions/checkout@v7
- uses: astral-sh/setup-uv@11f9893b081a58869d3b5fccaea48c9e9e46f990 # v8.3.2
with:
python-version: ${{ matrix.python-version }}
+8
View File
@@ -111,6 +111,14 @@ async for tweet in api.search("open source lang:en", limit=100):
print(tweet.id, tweet.rawContent)
```
Configure what happens when no account is immediately available:
```python
api = API(raise_when_no_account=True, wait_timeout=30, wait_interval=1)
```
`wait_timeout` limits how long to wait for a locked account, `wait_interval` controls how often the pool checks again, and `raise_when_no_account` raises `NoAccountError` instead of ending the operation. By default, twscrape waits indefinitely while active accounts are locked.
Search defaults to the Latest tab. Pass `kv={"product": "Top"}` or `kv={"product": "Media"}` to use another search product:
```python