Check that text line resembles url

main
bashrc 2026-07-19 11:15:00 +01:00
parent 03ff9496de
commit 3e3ffc51c1
1 changed files with 11 additions and 9 deletions

View File

@ -20,6 +20,7 @@ from src.utils import get_nickname_from_actor
from src.utils import get_domain_from_actor
from src.utils import url_text_to_number
from src.utils import save_json
from src.utils import resembles_url
from src.data import is_a_file
from src.data import load_list
from src.data import is_a_dir
@ -249,9 +250,10 @@ def get_featured_collections_feed(base_dir: str,
continue
if not collection_name:
continue
# add a collection item
# add a collection item which is typically an actor or hashtag url
item_url = ''
text = remove_html(text)
if resembles_url(text):
if '/tags/' in text:
# hashtag url
item_url = text