Merge PR #48: feat: add Xiaohongshu source + Reddit public fallback
- Xiaohongshu search via local MCP service (opt-in, zero impact if service not running) - Reddit public JSON fallback (works with zero API keys) - Reddit priority: ScrapeCreators -> OpenAI -> public fallback - Updated env.py: Reddit always available via public fallback Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
+14
@@ -0,0 +1,14 @@
|
||||
/**
|
||||
* Extract tweet ID from a Twitter/X URL or return the input unchanged if it's already an ID.
|
||||
*/
|
||||
const TWEET_URL_REGEX = /(?:twitter\.com|x\.com)\/(?:\w+\/status|i\/web\/status)\/(\d+)/i;
|
||||
export function extractTweetId(input) {
|
||||
// If it's a URL, extract the tweet ID
|
||||
const urlMatch = TWEET_URL_REGEX.exec(input);
|
||||
if (urlMatch) {
|
||||
return urlMatch[1];
|
||||
}
|
||||
// Assume it's already an ID
|
||||
return input;
|
||||
}
|
||||
//# sourceMappingURL=extract-tweet-id.js.map
|
||||
Reference in New Issue
Block a user