Skip to content

Commit 0f824c9

Browse files
committed
use xcancel url instead
1 parent 02a6732 commit 0f824c9

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

scripts/analyze_tech_article.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -335,6 +335,9 @@ def main():
335335
post_url = post_ref.get("url") if post_ref else args.url
336336
post_id = post_ref.get("id") if post_ref else None
337337

338+
if post_url.startswith("https://twitter.com") or post_url.startswith("https://x.com"):
339+
post_url = "https://xcancel.com" + post_url[post_url.index("/", 8):]
340+
338341
if not post_url.startswith("http"):
339342
print(f"Error: URL must start with http:// or https://", file=sys.stderr)
340343
sys.exit(1)

0 commit comments

Comments
 (0)