mirror of
https://github.com/Wanxp/obsidian-douban.git
synced 2026-04-04 16:48:44 +08:00
- Switch AllPageSearchPageFetcher from m.douban.com/rexxar/api/v2/search (returns 403 need_login) to www.douban.com/j/search (works with cookies) - Update AllFirstPageSearchResultPageParser and OtherAllPageSearchResultPageParser to use SearchParserHandler.parseSearchJson() matching the j/search response format, replacing the old Rexxar-specific SearchParserHandlerV2 parsing logic - Add await this.userComponent.login() in onload() so login state is initialized on startup, fixing false isLogin()=false causing "need login for next page" errors Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
14 lines
452 B
TypeScript
14 lines
452 B
TypeScript
import {AbstractSearchPageFetcher} from "./AbstractSearchPageFetcher";
|
|
import { SupportType } from "src/org/wanxp/constant/Constsant";
|
|
|
|
export class AllPageSearchPageFetcher extends AbstractSearchPageFetcher {
|
|
getUrl(keyword: string, start: number, pageSize: number): string {
|
|
return `https://www.douban.com/j/search?q=${keyword}&start=${start}`;
|
|
}
|
|
support(type: SupportType): boolean {
|
|
return type == SupportType.all;
|
|
}
|
|
|
|
|
|
}
|