feat: Add platform adapters for various content publishing platforms
- Implemented Dongchedi adapter for user detection and publishing. - Implemented Jianshu adapter for user detection and publishing. - Implemented Juejin adapter for user detection and publishing. - Implemented Qiehao adapter for user detection and publishing. - Implemented Smzdm adapter for user detection and publishing. - Implemented Sohuhao adapter for user detection and publishing. - Implemented Toutiaohao adapter for user detection and publishing. - Implemented Wangyihao adapter for user detection and publishing. - Implemented Weixin Gzh adapter for user detection and publishing. - Implemented Zol adapter for user detection and publishing. - Added documentation for manual testing of media publishing.
This commit is contained in:
@@ -128,19 +128,15 @@ export function createDefaultPlatformStates(): StoredPlatformState[] {
|
||||
}));
|
||||
}
|
||||
|
||||
export function buildPublishedUrl(platformId: string, externalArticleId: string): string {
|
||||
export function buildPublishedUrl(platformId: string, externalArticleId: string): string | null {
|
||||
switch (platformId) {
|
||||
case "toutiaohao":
|
||||
return `https://www.toutiao.com/article/${externalArticleId}/`;
|
||||
case "zhihu":
|
||||
return `https://zhuanlan.zhihu.com/p/${externalArticleId}`;
|
||||
case "bilibili":
|
||||
return `https://www.bilibili.com/read/cv${externalArticleId}/`;
|
||||
case "juejin":
|
||||
return `https://juejin.cn/post/${externalArticleId}`;
|
||||
case "jianshu":
|
||||
return `https://www.jianshu.com/p/${externalArticleId}`;
|
||||
default:
|
||||
return `https://example.com/${platformId}/${externalArticleId}`;
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user