Update StopTheMadness regex for copy/pasting properly
This commit is contained in:
@@ -21,13 +21,13 @@ readable in your history.
|
||||
|
||||
Replace `antisocial.example.com` with wherever you are running it.
|
||||
|
||||
| Platform | Find | Replace |
|
||||
| --- | --- | --- |
|
||||
| X | `^https://(?:www\.\|mobile\.)?(?:x\|twitter)\.com/(.*)$` | `https://antisocial.example.com/x/$1` |
|
||||
| Threads | `^https://(?:www\.)?threads\.(?:net\|com)/(.*)$` | `https://antisocial.example.com/threads/$1` |
|
||||
| Instagram | `^https://(?:www\.)?instagram\.com/(.*)$` | `https://antisocial.example.com/ig/$1` |
|
||||
| TikTok | `^https://(?:www\.\|vm\.\|vt\.)?tiktok\.com/(.*)$` | `https://antisocial.example.com/tiktok/$1` |
|
||||
| Bluesky | `^https://bsky\.app/(.*)$` | `https://antisocial.example.com/bsky/$1` |
|
||||
| Platform | Find | Replace |
|
||||
| --------- | ------------------------------------------------------------- | ------------------------------------------- |
|
||||
| X | `/^https:\/\/(?:www\.\|mobile\.)?(?:x\|twitter)\.com\/(.*)$/` | `https://antisocial.example.com/x/$1` |
|
||||
| Threads | `/^https:\/\/(?:www\.)?threads\.(?:net\|com)\/(.*)$/` | `https://antisocial.example.com/threads/$1` |
|
||||
| Instagram | `/^https:\/\/(?:www\.)?instagram\.com\/(.*)$/` | `https://antisocial.example.com/ig/$1` |
|
||||
| TikTok | `/^https:\/\/(?:www\.\|vm\.\|vt\.)?tiktok\.com\/(.*)$/` | `https://antisocial.example.com/tiktok/$1` |
|
||||
| Bluesky | `/^https:\/\/bsky\.app\/(.*)$/` | `https://antisocial.example.com/bsky/$1` |
|
||||
|
||||
So `https://x.com/user/status/123` becomes
|
||||
`https://antisocial.example.com/x/user/status/123`.
|
||||
@@ -54,13 +54,13 @@ Each adapter layers its extraction, most structured first:
|
||||
3. **The rendered DOM** — whatever is actually on screen is real.
|
||||
4. **Open Graph tags** — the floor, and enough to show something.
|
||||
|
||||
| Platform | Loads | Reads |
|
||||
| --- | --- | --- |
|
||||
| Bluesky | the public AT Protocol API | `getPostThread`; falls back to the post page |
|
||||
| X | `platform.twitter.com` embed | the `cdn.syndication.twimg.com/tweet-result` response |
|
||||
| Instagram | `/embed/captioned/` | `shortcode_media`, then the rendered `<video>`/`<img>` |
|
||||
| TikTok | the post page | `__UNIVERSAL_DATA_FOR_REHYDRATION__` |
|
||||
| Threads | the post page | the Relay payloads in `<script type="application/json">` |
|
||||
| Platform | Loads | Reads |
|
||||
| --------- | ---------------------------- | -------------------------------------------------------- |
|
||||
| Bluesky | the public AT Protocol API | `getPostThread`; falls back to the post page |
|
||||
| X | `platform.twitter.com` embed | the `cdn.syndication.twimg.com/tweet-result` response |
|
||||
| Instagram | `/embed/captioned/` | `shortcode_media`, then the rendered `<video>`/`<img>` |
|
||||
| TikTok | the post page | `__UNIVERSAL_DATA_FOR_REHYDRATION__` |
|
||||
| Threads | the post page | the Relay payloads in `<script type="application/json">` |
|
||||
|
||||
Media never gets linked straight at a CDN. Instagram and TikTok reject requests without
|
||||
a matching `Referer` (and sometimes cookies), and proxying keeps your browser from
|
||||
@@ -156,17 +156,17 @@ ground for a project this size.
|
||||
|
||||
Everything has a working default; the container needs none of it set.
|
||||
|
||||
| Variable | Default | |
|
||||
| --- | --- | --- |
|
||||
| `PORT` / `HOST` | `8080` / `0.0.0.0` | |
|
||||
| `PROFILE_DIR` | `./profile` (`/data/profile` in the image) | Chromium cookies and storage, persisted so the browser accumulates ordinary state |
|
||||
| `MAX_CONCURRENT` | `2` | page loads at once; the rest queue |
|
||||
| `NAVIGATION_TIMEOUT_MS` | `20000` | |
|
||||
| `RESOLVE_TIMEOUT_MS` | `30000` | whole resolve, including extraction |
|
||||
| `CACHE_TTL_MS` / `CACHE_MAX` | `3600000` / `200` | resolved posts, in memory |
|
||||
| `MEDIA_TOKEN_TTL_MS` | `21600000` | how long a `/m/` reference stays valid |
|
||||
| `PUBLIC_ORIGIN` | `http://localhost:8080` | only used to print the rules on `/` |
|
||||
| `LOG_LEVEL` | `info` | |
|
||||
| Variable | Default | |
|
||||
| ---------------------------- | ------------------------------------------ | --------------------------------------------------------------------------------- |
|
||||
| `PORT` / `HOST` | `8080` / `0.0.0.0` | |
|
||||
| `PROFILE_DIR` | `./profile` (`/data/profile` in the image) | Chromium cookies and storage, persisted so the browser accumulates ordinary state |
|
||||
| `MAX_CONCURRENT` | `2` | page loads at once; the rest queue |
|
||||
| `NAVIGATION_TIMEOUT_MS` | `20000` | |
|
||||
| `RESOLVE_TIMEOUT_MS` | `30000` | whole resolve, including extraction |
|
||||
| `CACHE_TTL_MS` / `CACHE_MAX` | `3600000` / `200` | resolved posts, in memory |
|
||||
| `MEDIA_TOKEN_TTL_MS` | `21600000` | how long a `/m/` reference stays valid |
|
||||
| `PUBLIC_ORIGIN` | `http://localhost:8080` | only used to print the rules on `/` |
|
||||
| `LOG_LEVEL` | `info` | |
|
||||
|
||||
## Adding a platform
|
||||
|
||||
|
||||
Reference in New Issue
Block a user