DEV Community

Mvuselelo Houston Khanyile
Mvuselelo Houston Khanyile

Posted on

How do I extract a nested tuple from a tuple?

I'm using snscrape to scrape instagram. snscrape returns the data in tuple format but it creates the instagram data in a nested tuple. eg.

for b in enumerate(sninstagram.InstagramUserScraper(username='houston_2731').get_items())
        print[(b)]

output

(0, InstagramPost(url='https://www.instagram.com/p/CUdFfjEImHN/', date=datetime.datetime(2021, 9, 30, 17, 39, 20, tzinfo=datetime.timezone.utc), content='"Hardwork plus patience. A symbol of my sacrifice I\'m doing waiting."

Top comments (0)