Skip to content

Commit 3065e5d

Browse files
committed
fix toggle for render_js settings
1 parent ed56b83 commit 3065e5d

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

README.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,4 +77,10 @@ cp .env.example .env.local
7777

7878
```sh
7979
npm dev
80-
```
80+
```
81+
82+
## Stars History
83+
84+
## Star History
85+
86+
[![Star History Chart](https://api.star-history.com/svg?repos=getlinksc/css-selector-tool&type=Date)](https://star-history.com/#getlinksc/css-selector-tool&Date)

pages/api/request.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ export default async function handler(req, res) {
4141

4242
payload["user-agent"] = USER_AGENT;
4343
payload["method"] = "GET";
44-
payload["render_js"] = true;
44+
payload["render_js"] = body.render_js ? true : false;
4545

4646
const config = {
4747
"body": JSON.stringify(payload),
@@ -69,6 +69,7 @@ export default async function handler(req, res) {
6969

7070
const html = await resp.text();
7171

72+
console.log(`html before: ${html.length}: ${html}`)
7273
// add in the query selector
7374
const $ = cheerio.load(html);
7475
// console.log(`appending selector js :${SELECTOR_JS}`)

0 commit comments

Comments
 (0)