@@ -9,14 +9,14 @@ Task: [Create/Debug/Analyze] DS Source for [URL/File]
99Steps:
10101 . ** Analyze/Fetch** : Use ` fetch_spider_url ` to inspect HTML/Headers or ` read_file ` to load existing code (auto-decrypted).
11112 . ** Develop/Refine** :
12- - Use ` get_spider_template ` for new files.
13- - Implement ` rule ` object (see KB below).
14- - For dynamic content, use ` async ` parsing or ` lazy ` loading.
15- - For novels, ` lazy ` returns ` novel:// ` + JSON.
12+ - Use ` get_spider_template ` for new files.
13+ - Implement ` rule ` object (see KB below).
14+ - For dynamic content, use ` async ` parsing or ` lazy ` loading.
15+ - For novels, ` lazy ` returns ` novel:// ` + JSON.
16163 . ** Validate** :
17- - Save via ` write_file ` to ` spider/js/[Name].js ` .
18- - Check syntax (` check_syntax ` ) and structure (` validate_spider ` ).
19- - Test rules (` debug_spider_rule ` ) against real content.
17+ - Save via ` write_file ` to ` spider/js/[Name].js ` .
18+ - Check syntax (` check_syntax ` ) and structure (` validate_spider ` ).
19+ - Test rules (` debug_spider_rule ` ) against real content.
2020```
2121
2222## Skill 2: System Maintenance
@@ -93,6 +93,27 @@ lazy: async function() { return { parse: 0, url: 'novel://' + JSON.stringify({ti
9393| ` setItem(k, v) ` / ` getItem(k) ` | Persistent storage. |
9494| ` urljoin(base, path) ` | URL resolution. |
9595
96+ ### 5. Content Type Specifics
97+
98+ - ** Novels (` 类型: '小说' ` )** :
99+ - ` lazy ` should return ` novel:// ` followed by a JSON string of ` { title, content } ` .
100+ ``` javascript
101+ lazy : async function () {
102+ let content = ' ...' ; // Decrypted text
103+ let ret = JSON .stringify ({ title: ' Chapter 1' , content: content });
104+ return { parse: 0 , url: ' novel://' + ret };
105+ }
106+ ```
107+
108+ - ** Comics/ Images (` 类型: '漫画'` )** :
109+ - ` lazy` should return ` pics://` followed by image URLs joined by ` &&` .
110+ ` ` ` javascript
111+ lazy: async function() {
112+ let pics = ['http://img1.jpg', 'http://img2.jpg'];
113+ return { parse: 0, url: 'pics://' + pics.join('&&') };
114+ }
115+ ` ` `
116+
96117## Tool Reference
97118| Tool | Usage |
98119| : -- - | : -- - |
@@ -102,4 +123,4 @@ lazy: async function() { return { parse: 0, url: 'novel://' + JSON.stringify({ti
102123| ` check_syntax` | Validate JS syntax. |
103124| ` read_file` | Read & ** Auto- Decrypt** . |
104125| ` get_spider_template` | Standard template. |
105- | ` manage_config ` | Edit env.json. |
126+ | ` manage_config` | Edit env .json . |
0 commit comments