Spaces:
Paused
Paused
Download server/scripts/analyze-debug-html.cjs from shanshal66/chinak2: direct link, hf CLI and curl.
- Browser
- Download file 761 Bytes
-
https://huggingface.co/spaces/shanshal66/chinak2/resolve/main/server/scripts/analyze-debug-html.cjs
- Command line
-
hf download hf://spaces/shanshal66/chinak2/server/scripts/analyze-debug-html.cjs
-
curl -L -o analyze-debug-html.cjs https://huggingface.co/spaces/shanshal66/chinak2/resolve/main/server/scripts/analyze-debug-html.cjs
761 Bytes
| const fs = require('fs'); | |
| const cheerio = require('cheerio'); | |
| const html = fs.readFileSync('e:\\mynewproject2\\server\\xianyu-category-debug.html', 'utf8'); | |
| const $ = cheerio.load(html); | |
| console.log('Total anchors:', $('a').length); | |
| $('a').each((i, el) => { | |
| const href = $(el).attr('href'); | |
| const classNames = $(el).attr('class'); | |
| const parentClass = $(el).parent().attr('class'); | |
| console.log(`Link ${i}: href="${href}", class="${classNames}", parentClass="${parentClass}"`); | |
| }); | |
| // Also print generic structure to find product container | |
| console.log('\n--- Potential Product Containers ---'); | |
| $('div[class*="feed"], div[class*="list"], div[class*="item"]').each((i, el) => { | |
| console.log(`Div ${i}: class="${$(el).attr('class')}"`); | |
| }); | |