question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

I’ve been using this library for the past few months to obtain data related to my country’s ministry of health, and it’s been working very well, until today. The following code, which usually works and returns the respective data, currently produces no data for ‘post’ and hence, nothing for postText, postImage or postURL:

for post in get_posts('MinistryofHealthTT', pages=1): 
    postText    = post['text'][:50]
    postImage   = post['image']
    postURL     = post['post_url']

Usually the data is produced in the form of a dictionary, however none of the data is currently being extracted. I also know for sure that the post exists. Hoping someone could provide me with assistance/clarification on why I am unable to receive data from this function, or if there was an update to this function that I missed

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:2
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

3reactions
KristofferKcommented, Sep 20, 2020

This was a change at Facebook but it seems like they have reverted it again, so you should once again be able to scrape

0reactions
neon-ninjacommented, Jun 16, 2021
pprint(next(get_posts(post_urls=["https://m.facebook.com/story.php?story_fbid=3725601007469680&substory_index=0&id=151162024913614"])))

returns

{'available': True,
 'comments': 23,
 'comments_full': None,
 'factcheck': None,
 'image': 'https://scontent.fakl1-3.fna.fbcdn.net/v/t1.6435-9/fr/cp0/e15/q65/119713035_3725601014136346_9219913483351361425_n.jpg?_nc_cat=108&ccb=1-3&_nc_sid=da1649&_nc_ohc=Xjl3URBLie0AX-zsf5v&_nc_ht=scontent.fakl1-3.fna&tp=14&oh=026ee7cead34083ec262da27bdae77c0&oe=60CFA59A',
 'image_lowquality': 'https://scontent.fakl1-3.fna.fbcdn.net/v/t1.6435-9/cp0/e15/q65/s1080x2048/119713035_3725601014136346_9219913483351361425_n.jpg?_nc_cat=108&ccb=1-3&_nc_sid=da1649&_nc_ohc=Xjl3URBLie0AX-zsf5v&_nc_ht=scontent.fakl1-3.fna&tp=9&oh=683cfe969daee4560a0f64c0c06071a6&oe=60CE157C',
 'images': ['https://scontent.fakl1-3.fna.fbcdn.net/v/t1.6435-9/fr/cp0/e15/q65/119713035_3725601014136346_9219913483351361425_n.jpg?_nc_cat=108&ccb=1-3&_nc_sid=da1649&_nc_ohc=Xjl3URBLie0AX-zsf5v&_nc_ht=scontent.fakl1-3.fna&tp=14&oh=026ee7cead34083ec262da27bdae77c0&oe=60CFA59A'],
 'images_description': None,
 'images_lowquality': ['https://scontent.fakl1-3.fna.fbcdn.net/v/t1.6435-9/cp0/e15/q65/s1080x2048/119713035_3725601014136346_9219913483351361425_n.jpg?_nc_cat=108&ccb=1-3&_nc_sid=da1649&_nc_ohc=Xjl3URBLie0AX-zsf5v&_nc_ht=scontent.fakl1-3.fna&tp=9&oh=683cfe969daee4560a0f64c0c06071a6&oe=60CE157C'],
 'images_lowquality_description': ['No photo description available.'],
 'is_live': False,
 'likes': 58,
 'link': None,
 'original_request_url': 'https://m.facebook.com/story.php?story_fbid=3725601007469680&substory_index=0&id=151162024913614',
 'post_id': '3725601007469680',
 'post_text': 'Ministry of Health - Trinidad and Tobago\n'
              '\n'
              'MoH COVID-19 Update #471',
 'post_url': 'https://m.facebook.com/3725601007469680',
 'reaction_count': None,
 'reactions': None,
 'reactors': None,
 'shared_post_id': None,
 'shared_post_url': None,
 'shared_text': None,
 'shared_time': None,
 'shared_user_id': None,
 'shared_username': None,
 'shares': 214,
 'text': 'Ministry of Health - Trinidad and Tobago\n\nMoH COVID-19 Update #471',
 'time': datetime.datetime(2020, 9, 20, 0, 0),
 'user_id': None,
 'user_url': 'https://facebook.com/MinistryofHealthTT/?refid=52&__tn__=%2Cg',
 'username': 'Ministry of Health - Trinidad and Tobago',
 'video': None,
 'video_duration_seconds': None,
 'video_height': None,
 'video_id': None,
 'video_quality': None,
 'video_size_MB': None,
 'video_thumbnail': None,
 'video_watches': None,
 'video_width': None,
 'w3_fb_url': None}

so this seems fixed

Read more comments on GitHub >

github_iconTop Results From Across the Web

POST http://localhost:3000/ 404 (Not Found) - Stack Overflow
The error is POST http://localhost:3000/ 404 (Not Found). You don't have a post route for /. You can create one like so: router.post('/' ......
Read more >
POST request 404 not found - Help - Postman community
I am having a response when I choose GET request, but when I change it to POST, I get a 404 not found...
Read more >
404 Not Found Error: What It Is and How to Fix It - Airbrake Blog
The 404 Not Found Error is an HTTP response status code, which indicates that the requested resource could not be found.
Read more >
POST http://localhost:3000/ 404 (Not Found) - JavaScript
I'm trying to set up a simple checkout using Stripe, but when making the POST request to the server I'm getting a 404...
Read more >
How to Fix Error 404 Not Found on Your WordPress Site - Kinsta
The Error 404 Not Found status code indicates that the origin server ... In this post, we're going to try to help you...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found