feat: 开发采集、采集箱和商品编辑功能
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
/**
|
||||
* Profile 路由 - 根据 URL 匹配平台
|
||||
*/
|
||||
import type { SiteProfile } from './types';
|
||||
import { profile1688 } from './1688';
|
||||
import { profileTaobao } from './taobao';
|
||||
|
||||
const PROFILES: SiteProfile[] = [
|
||||
profile1688,
|
||||
profileTaobao
|
||||
];
|
||||
|
||||
export function matchProfile(url: string): SiteProfile | null {
|
||||
for (const p of PROFILES) {
|
||||
if (p.urlPatterns.some(re => re.test(url))) {
|
||||
return p;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
export { profile1688, profileTaobao };
|
||||
export type { SiteProfile };
|
||||
Reference in New Issue
Block a user