yshalsager / facebook2rss

Turn Facebook feeds into RSS!
GNU General Public License v3.0
33 stars 5 forks source link

Find a way to get posts dates from Facebook #6

Closed yshalsager closed 3 years ago

yshalsager commented 3 years ago

Currently, the generated RSS doesn't have any date information of fetched posts.

I think it would be better if it had the date of each post but not sure how could this be implemented since different locales will have different date formats.

More investigation is needed.

yshalsager commented 3 years ago

It seems that mbasic website doesn't have the timestamp of posts. Meanwhile mobile and main sites have it. https://github.com/kevinzg/facebook-scraper/blob/8f1bf85c08aa7e2192ab648315650ae1e1001952/facebook_scraper/extractors.py#L208

yshalsager commented 3 years ago

Thanks to https://github.com/scrapinghub/dateparser it's possible to turn relative dates into datetime objects 🎉 . This enabled me to add the post's date even with mbasic site.