parent
12482f4298
commit
c10a5d3c2f
@ -1,10 +1,12 @@
|
|||||||
import re
|
import re
|
||||||
|
|
||||||
from utils.console import print_substep
|
from utils.console import print_substep
|
||||||
|
|
||||||
|
|
||||||
def id(reddit_obj: dict):
|
def id(reddit_obj: dict):
|
||||||
"""
|
"""
|
||||||
This function takes a reddit object and returns the post id
|
This function takes a reddit object and returns the post id
|
||||||
"""
|
"""
|
||||||
id = re.sub(r"[^\w\s-]", "", reddit_obj["thread_id"])
|
id = re.sub(r"[^\w\s-]", "", reddit_obj["thread_id"])
|
||||||
print_substep(f"Thread ID is {id}", style="bold blue")
|
print_substep(f"Thread ID is {id}", style="bold blue")
|
||||||
return id
|
return id
|
||||||
|
Loading…
Reference in new issue