Skip to content

Commit 2b9af38

Browse files
authored
feat(pixiv): surface user_id + url on listings, url on user/illusts (#1300)
While auditing instagram/facebook/pixiv coverage gaps, found that pixiv listings already extract `user_id` and construct `url` per row but drop both fields from the table view (`columns` doesn't list them). The data is in the row object — only the column projection was missing. Per the listing↔detail id pairing convention (#1297), surface them so: - `user_id` round-trips from `ranking` / `search` → `user` / `illusts` - `url` is the canonical share link for every illust / user record Changes: - `ranking`: + user_id, + url - `search`: + user_id, + url - `illusts`: + url (user_id is the arg, no need to repeat per row) - `user`: + url No behavior change beyond the table view — JSON output already had these fields, so existing scripts that consume `-f json` keep working.
1 parent 545f91a commit 2b9af38

6 files changed

Lines changed: 26 additions & 7 deletions

File tree

cli-manifest.json

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14258,7 +14258,8 @@
1425814258
"pages",
1425914259
"bookmarks",
1426014260
"tags",
14261-
"created"
14261+
"created",
14262+
"url"
1426214263
],
1426314264
"type": "js",
1426414265
"modulePath": "pixiv/illusts.js",
@@ -14311,9 +14312,11 @@
1431114312
"rank",
1431214313
"title",
1431314314
"author",
14315+
"user_id",
1431414316
"illust_id",
1431514317
"pages",
14316-
"bookmarks"
14318+
"bookmarks",
14319+
"url"
1431714320
],
1431814321
"type": "js",
1431914322
"modulePath": "pixiv/ranking.js",
@@ -14381,10 +14384,12 @@
1438114384
"rank",
1438214385
"title",
1438314386
"author",
14387+
"user_id",
1438414388
"illust_id",
1438514389
"pages",
1438614390
"bookmarks",
14387-
"tags"
14391+
"tags",
14392+
"url"
1438814393
],
1438914394
"type": "js",
1439014395
"modulePath": "pixiv/search.js",
@@ -14416,7 +14421,8 @@
1441614421
"illusts",
1441714422
"manga",
1441814423
"novels",
14419-
"comment"
14424+
"comment",
14425+
"url"
1442014426
],
1442114427
"type": "js",
1442214428
"modulePath": "pixiv/user.js",

clis/pixiv/illusts.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ cli({
1919
{ name: 'user-id', positional: true, required: true, help: 'Pixiv user ID' },
2020
{ name: 'limit', type: 'int', default: 20, help: 'Number of results' },
2121
],
22-
columns: ['rank', 'title', 'illust_id', 'pages', 'bookmarks', 'tags', 'created'],
22+
columns: ['rank', 'title', 'illust_id', 'pages', 'bookmarks', 'tags', 'created', 'url'],
2323
func: async (page, kwargs) => {
2424
const userId = String(kwargs['user-id'] ?? '');
2525
const limit = Number(kwargs.limit) || 20;

clis/pixiv/ranking.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ cli({
2727
{ name: 'page', type: 'int', default: 1, help: 'Page number' },
2828
{ name: 'limit', type: 'int', default: 20, help: 'Number of results' },
2929
],
30-
columns: ['rank', 'title', 'author', 'illust_id', 'pages', 'bookmarks'],
30+
columns: ['rank', 'title', 'author', 'user_id', 'illust_id', 'pages', 'bookmarks', 'url'],
3131
pipeline: [
3232
{ navigate: 'https://www.pixiv.net' },
3333
{ evaluate: `(async () => {

clis/pixiv/search.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ cli({
1919
{ name: 'mode', type: 'str', default: 'all', help: 'Search mode', choices: ['all', 'safe', 'r18'] },
2020
{ name: 'page', type: 'int', default: 1, help: 'Page number' },
2121
],
22-
columns: ['rank', 'title', 'author', 'illust_id', 'pages', 'bookmarks', 'tags'],
22+
columns: ['rank', 'title', 'author', 'user_id', 'illust_id', 'pages', 'bookmarks', 'tags', 'url'],
2323
func: async (page, kwargs) => {
2424
const { query, limit = 20, order = 'date_d', mode = 'all', page: pageNum = 1 } = kwargs;
2525
const encoded = encodeURIComponent(query);

clis/pixiv/user.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ cli({
1919
'manga',
2020
'novels',
2121
'comment',
22+
'url',
2223
],
2324
pipeline: [
2425
{ navigate: 'https://www.pixiv.net' },

docs/adapters/browser/pixiv.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,18 @@
1313
| `opencli pixiv detail <id>` | View illustration details |
1414
| `opencli pixiv download <illust-id>` | Download original-quality images |
1515

16+
## Output Columns
17+
18+
| Command | Columns |
19+
|---------|---------|
20+
| `ranking` | `rank, title, author, user_id, illust_id, pages, bookmarks, url` |
21+
| `search` | `rank, title, author, user_id, illust_id, pages, bookmarks, tags, url` |
22+
| `illusts` | `rank, title, illust_id, pages, bookmarks, tags, created, url` |
23+
| `user` | `user_id, name, premium, following, illusts, manga, novels, comment, url` |
24+
| `detail` | `illust_id, title, author, type, pages, bookmarks, likes, views, tags, created, url` |
25+
26+
`illust_id` round-trips from `ranking` / `search` / `illusts` into `detail` / `download`. `user_id` round-trips from `ranking` / `search` into `user` / `illusts`.
27+
1628
## Usage Examples
1729

1830
### Ranking

0 commit comments

Comments
 (0)