fix(backend/x-bot): 고정 트윗 다음 트윗이 무시되는 버그 수정
- 고정 트윗 체크 로직이 이전 컨테이너를 참조하여 다음 트윗도 고정으로 판단하는 버그 수정 - 현재 컨테이너 내에 'class="pinned"'가 있는지만 확인하도록 변경 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
94fc7b4c7f
commit
2ebee0682c
1 changed files with 4 additions and 6 deletions
|
|
@ -153,9 +153,8 @@ async function fetchTweetsFromNitter(nitterUrl, username) {
|
|||
const container = tweetContainers[i];
|
||||
const tweet = {};
|
||||
|
||||
// 고정 트윗 체크
|
||||
tweet.isPinned =
|
||||
tweetContainers[i - 1].includes("pinned") || container.includes("Pinned");
|
||||
// 고정 트윗 체크 - 현재 컨테이너 내에 pinned 클래스가 있는지 확인
|
||||
tweet.isPinned = container.includes('class="pinned"');
|
||||
|
||||
// 리트윗 체크
|
||||
tweet.isRetweet = container.includes('class="retweet-header"');
|
||||
|
|
@ -223,9 +222,8 @@ async function fetchAllTweetsFromNitter(nitterUrl, username) {
|
|||
const container = tweetContainers[i];
|
||||
const tweet = {};
|
||||
|
||||
tweet.isPinned =
|
||||
tweetContainers[i - 1].includes("pinned") ||
|
||||
container.includes("Pinned");
|
||||
// 고정 트윗 체크 - 현재 컨테이너 내에 pinned 클래스가 있는지 확인
|
||||
tweet.isPinned = container.includes('class="pinned"');
|
||||
tweet.isRetweet = container.includes('class="retweet-header"');
|
||||
|
||||
const linkMatch = container.match(/href="\/[^\/]+\/status\/(\d+)/);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue