Fixes input handling for event URLs/IDs

Moves the Meetup URL/ID extraction logic outside the
conditional block that checks for an empty input. This
ensures that the extraction logic is always executed,
regardless of whether the event URL or ID was
provided as a command-line argument or via user input.
This commit is contained in:
fundor333
2025-09-29 23:14:39 +02:00
parent 4b51922738
commit 4e43895e4e

View File

@@ -130,9 +130,9 @@ def main(
return
if text is None:
text = input("Give me a Meetup event URL or ID: ")
match = re.search(r"meetup.com/.+?/events/(\d+)", text)
if match:
text = match.group(1)
match = re.search(r"meetup.com/.+?/events/(\d+)", text)
if match:
text = match.group(1)
add_to_memory(text)
data = fetch_event(text)
convert_json_to_post(data)