chris-greening/instascrape

How to get Photo or video Src ?

jimmyxp01 opened this issue · 1 comments

I want the full link of posts. how to extract this?
post link: https://www.instagram.com/p/CP5VLwPMnrF/

Need (Example): https://instagram.fccu20-1.fna.fbcdn.net/v/t51.2885-15/e35/197884809_865699657359940_2163597179560292049_n.jpg?tp=1&_nc_ht=instagram.fccu20-1.fna.fbcdn.net&_nc_cat=104&_nc_ohc=9xGuy1FN8MoAX-Nztrd&edm=AABBvjUBAAAA&ccb=7-4&oh=f0f99f225af923a1b405ceb7546bc4e0&oe=60D9E241&_nc_sid=83d603

Anyone help me. I need A user all photo, video, reel links list. I don't want to download them, just need links like the above one.

check the property of post: flat_json_dict['text']

If you follow this blogpost add in the for-loop the following statement:

for post in chris_photos:
if 'text' in post.flat_json_dict:
text= post.flat_json_dict['text']
else:
text = "NaN"

The variable text will give you now what you need.