Skip to content

🤯 LobeHub - Super-Agents on Your Team. Add super-agents to the chats your team already uses.They take on work by themselves and get better every week.

🔥 chore(web-crawler): remove WeChat URL rules (#14633)

Arvin Xu4b8105b8b274
diff --git a/packages/web-crawler/src/__tests__/urlRules.test.ts b/packages/web-crawler/src/__tests__/urlRules.test.ts
index 01a1d96496a..9b42e96f6f5 100644
--- a/packages/web-crawler/src/__tests__/urlRules.test.ts
+++ b/packages/web-crawler/src/__tests__/urlRules.test.ts
@@ -31,15 +31,6 @@ describe('urlRules', () => {
});
describe('specific URL patterns', () => {
- it('should match WeChat Sogou links', () => {
- const wechatRule = crawUrlRules.find(
- (rule) => rule.urlPattern === 'https://weixin.sogou.com/link(.*)',
- );
-
- expect(wechatRule).toBeDefined();
- expect(wechatRule?.impls).toEqual(['search1api']);
- });
-
it('should match Sogou links', () => {
const sogouRule = crawUrlRules.find(
(rule) => rule.urlPattern === 'https://sogou.com/link(.*)',
@@ -67,15 +58,6 @@ describe('urlRules', () => {
expect(redditRule?.impls).toEqual(['search1api']);
});
- it('should match WeChat public account links', () => {
- const wechatPublicRule = crawUrlRules.find(
- (rule) => rule.urlPattern === 'https://mp.weixin.qq.com(.*)',
- );
-
- expect(wechatPublicRule).toBeDefined();
- expect(wechatPublicRule?.impls).toEqual(['search1api', 'jina']);
- });
-
it('should match GitHub blob links with URL transformation', () => {
const githubBlobRule = crawUrlRules.find(
(rule) => rule.urlPattern === 'https://github.com/([^/]+)/([^/]+)/blob/([^/]+)/(.*)',
@@ -250,7 +232,6 @@ describe('urlRules', () => {
const patterns = crawUrlRules.map((rule) => rule.urlPattern);
// Check for Chinese platforms
- expect(patterns.some((p) => p.includes('weixin.sogou.com'))).toBe(true);
expect(patterns.some((p) => p.includes('xiaohongshu.com'))).toBe(true);
expect(patterns.some((p) => p.includes('feishu.cn'))).toBe(true);
});
diff --git a/packages/web-crawler/src/urlRules.ts b/packages/web-crawler/src/urlRules.ts
index ba036549719..aefb0c388e0 100644
--- a/packages/web-crawler/src/urlRules.ts
+++ b/packages/web-crawler/src/urlRules.ts
@@ -1,11 +1,6 @@
import type { CrawlUrlRule } from './type';
export const crawUrlRules: CrawlUrlRule[] = [
- // Sogou WeChat links, use search1api
- {
- impls: ['search1api'],
- urlPattern: 'https://weixin.sogou.com/link(.*)',
- },
// Sogou links, use search1api
{
impls: ['search1api'],
@@ -21,11 +16,6 @@ export const crawUrlRules: CrawlUrlRule[] = [
impls: ['search1api'],
urlPattern: 'https://www.reddit.com/r/(.*)/comments/(.*)',
},
- // WeChat official accounts have crawler protection, use search1api first, jina as fallback (currently jina crawling may be blocked)
- {
- impls: ['search1api', 'jina'],
- urlPattern: 'https://mp.weixin.qq.com(.*)',
- },
// GitHub source code parsing
{
filterOptions: {