Skip to content

Commit d0a09fa

Browse files
author
Taois
committed
feat: 优化fetch函数返回,支持请求头
1 parent 317d422 commit d0a09fa

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

libs_drpy/drpyInject.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -737,12 +737,11 @@ class BaseSpider {
737737
}
738738

739739
async fetch(url, options) {
740-
const content = (await req(url, options)).content;
740+
const resp = await req(url, options);
741741
return {
742-
content,
742+
...resp,
743743
get data() { // data尝试返回object
744744
try {
745-
// console.log('get data:', this.content);
746745
return this.content.parseX;
747746
} catch (e) {
748747
return {};

0 commit comments

Comments
 (0)