using python 3 and BeautifulSoup 4
my code when run returns a big list like the txt below
but 100 times more i have only posted one as an example
urls = ['https://example.com']
for url in urls:
response = requests.get(url)
soup = BeautifulSoup(response.content, "html.parser")
for text in soup.find_all(text= True):
print(text)
code above returns
this
{"users":{"userId":222222222,"username":"some_name","hlsPreviewUrl":"https://example.com/322/example-origin-live/some_name-322-33babf1b-6030-479a-ac41-b90bd8313678_aac/playlist.m3u8 }
i want to extract the username and the url and print it
i have tried to add this piece of code but i get nothing
if 'username' in ['text']:
what code am i missing
to print just the username and the url
with python 3 and BeautifulSoup 4
thanks