File tree Expand file tree Collapse file tree 5 files changed +6
-5
lines changed
Expand file tree Collapse file tree 5 files changed +6
-5
lines changed Original file line number Diff line number Diff line change 1- import { Route } from '@/types' ;
21import { load } from 'cheerio' ;
3- import ofetch from '@/utils/ofetch' ;
2+
43import logger from '@/utils/logger' ;
4+ import ofetch from '@/utils/ofetch' ;
5+ import type { Route } from '@/types' ;
56
67export const route : Route = {
78 path : '/search/:keywords' ,
@@ -41,7 +42,7 @@ export const route: Route = {
4142 . map ( ( item ) => {
4243 const $item = $ ( item ) ;
4344 const titleElement = $item . find ( '.s-item__title, .s-card__title, .s-item__title--has-tags' ) ;
44- const title = titleElement . text ( ) . replace ( / ^ N e w L i s t i n g / i, '' ) . trim ( ) ;
45+ const title = titleElement . text ( ) . replace ( / ^ N e w L i s t i n g / i, '' ) ;
4546 const link = $item . find ( '.s-item__link, .s-card__link' ) . attr ( 'href' ) ;
4647 const price = $item . find ( '.s-item__price, .s-card__price' ) . text ( ) . trim ( ) ;
4748 const image =
Original file line number Diff line number Diff line change 1- import { Route } from '@/types' ;
21import { load } from 'cheerio' ;
2+
33import ofetch from '@/utils/ofetch' ;
4+ import type { Route } from '@/types' ;
45
56export const route : Route = {
67 path : [ '/usr/:username' , '/user/:username' ] ,
Original file line number Diff line number Diff line change 1- import { CheerioAPI , Element } from 'cheerio' ;
21
32/**
43 * Transforms an eBay image URL to prefer WebP format if it's a JPG/JPEG.
You can’t perform that action at this time.
0 commit comments