From a1522283684b200957b0a26bcc90a512356f1e3a Mon Sep 17 00:00:00 2001 From: SyedAhris Date: Sat, 25 Apr 2026 19:14:46 +0500 Subject: [PATCH 1/2] fix: use .text instead of .contents[0] in user.loves() to handle empty titles --- scratchattach/site/user.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scratchattach/site/user.py b/scratchattach/site/user.py index 51db4c61..ddcc5d22 100644 --- a/scratchattach/site/user.py +++ b/scratchattach/site/user.py @@ -654,8 +654,8 @@ def loves( project_id = commons.webscrape_count( first_anchor.attrs["href"], "/projects/", "/" ) - title = second_anchor.contents[0] - author = third_anchor.contents[0] + title = second_anchor.text + author = third_anchor.text # Instantiating a project with the properties that we know # This may cause issues (see below) From f76e13ccede976f0e3d04b417fd869474068fcc5 Mon Sep 17 00:00:00 2001 From: SyedAhris Date: Sat, 25 Apr 2026 19:17:03 +0500 Subject: [PATCH 2/2] revert author anchor back to .contents[0] --- scratchattach/site/user.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scratchattach/site/user.py b/scratchattach/site/user.py index ddcc5d22..af3ff93a 100644 --- a/scratchattach/site/user.py +++ b/scratchattach/site/user.py @@ -655,7 +655,7 @@ def loves( first_anchor.attrs["href"], "/projects/", "/" ) title = second_anchor.text - author = third_anchor.text + author = third_anchor.contents[0] # Instantiating a project with the properties that we know # This may cause issues (see below)