MOHOAzure / FB-auto-reporter

A fb page bot automatically collects news and makes reports
2 stars 0 forks source link

the morning news report is empty #12

Open MOHOAzure opened 3 years ago

MOHOAzure commented 3 years ago

No news is reported, only pre-defined messages.

This may not be a problem since the pages really have no posts at 00:00~0700.

MOHOAzure commented 3 years ago

This issue is related to #10, and it is related to the library facebook-scraper.

It's observed that library facebook-scraper has bug in reporting time of a fb post.

For example, a fb post is created at December 2 2020 at PM3:16.

The time of this post is reported as 2020-12-02 08:00:08.593414 by facebook-scraper.

It seems like there is a time offset +0716.

After checking some news reports, it's confirmed that the time offset ranges from 7 to 8 hours.

MOHOAzure commented 3 years ago

The bug fix logic in commit c726a211e3a2269ac9341972fc21081a714d1c7b & bf4c33a476ea86f4c1d46a9124a618498dc2eb90 is to make the machine running the script successfully identify the date in the specified time zone.

The assumption of these two commits is that the time of each post reported by library facebook-scraper is correct and is converted in the specified time zone.

For now, the time is not correct and time offsets are not consistent.

Changing the lib should be considered.

MOHOAzure commented 3 years ago

For temporarily fixing this bug #12, the time of each post reported by facebook-scraper convert to time in the specified time zone.

For example, the time of a post is reported as 2020-12-02 08:00:08.593414 by facebook-scraper, and the specified time zone is "+0800".

Then the time is converted to 2020-12-02 16:00:08.593414.