File tree Expand file tree Collapse file tree 6 files changed +17
-6
lines changed
Expand file tree Collapse file tree 6 files changed +17
-6
lines changed Original file line number Diff line number Diff line change @@ -733,11 +733,22 @@ class BaseSpider {
733733 this . play = this . playerContent ;
734734 this . homeVod = this . homeVideoContent ;
735735 this . proxy = this . localProxy ;
736+ // this.fetch = request;
736737 }
737738
738739 async fetch ( url , options ) {
739740 const content = ( await req ( url , options ) ) . content ;
740- return { data : content . parseX } ;
741+ return {
742+ content,
743+ get data ( ) { // data尝试返回object
744+ try {
745+ // console.log('get data:', this.content);
746+ return this . content . parseX ;
747+ } catch ( e ) {
748+ return { } ;
749+ }
750+ }
751+ } ;
741752 }
742753
743754 async homeContent ( ) {
Original file line number Diff line number Diff line change 55 searchable: 1,
66 filterable: 1,
77 quickSearch: 1,
8- title: 'B站 ',
8+ title: '哩哩[官] ',
99 lang: 'cat'
1010 })
1111 */
Original file line number Diff line number Diff line change 55 searchable: 1,
66 filterable: 1,
77 quickSearch: 1,
8- title: '央视大全 ',
8+ title: '央央[官] ',
99 lang: 'cat'
1010 })
1111 */
Original file line number Diff line number Diff line change 55 searchable: 1,
66 filterable: 1,
77 quickSearch: 1,
8- title: '爱奇艺视频 ',
8+ title: '奇奇[官] ',
99 lang: 'cat'
1010 })
1111 */
Original file line number Diff line number Diff line change 55 searchable: 1,
66 filterable: 1,
77 quickSearch: 1,
8- title: '芒果TV ',
8+ title: '果果[官] ',
99 lang: 'cat'
1010 })
1111 */
Original file line number Diff line number Diff line change 55 searchable: 1,
66 filterable: 1,
77 quickSearch: 1,
8- title: '优酷视频 ',
8+ title: '酷酷[官] ',
99 lang: 'cat'
1010 })
1111 */
You can’t perform that action at this time.
0 commit comments