facebook-scraper
facebook-scraper copied to clipboard
PytzUsageWarning: The localize method is no longer necessary
/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/dateparser/date_parser.py:35: PytzUsageWarning: The localize method is no longer necessary, as this time zone supports the fold attribute (PEP 495). For more details on migrating to a PEP 495-compliant implementation, see https://pytz-deprecation-shim.readthedocs.io/en/latest/migration.html date_obj = stz.localize(date_obj)
PytzUsageWarning comes from pytz_deprecation_shim package which is the dependency of tzlocal. tzlocal is deeply integrated with pytz.
pip install tzlocal==2.1
But, please, pay attention it could break other project dependencies, so be careful.
This sounds like an issue for dateparser, not facebook-scraper. In fact, several people have already raised this in dateparser's issue tracker, see https://github.com/scrapinghub/dateparser/issues/1013
thank you very much you helped me a lot it works to scrape the pages I no longer use cookies and I installed tzlocal==2.1
The problem was fixed in dateparser 1.1.2, would you like a PR to update the dependency?