I add the UNIX timestamp to the item using an item pipeline. In essence, my code is:
item['timestamp'] = datetime.datetime.now(datetime.timezone.utc())
Although datetime comes pre-installed with Python on my machine, it was not available on Scrapinghub, and, therefore, resulted in errors. I used the instructions ast https://support.scrapinghub.com/support/solutions/articles/22000200400-deploying-python-dependencies-for-your-projects-in-scrapy-cloud to include datetime as a dependency in the requirements.txt file. After deploying my project to Scrapinghub I got the error that now() does not exist in datetime.datetime.
What am I doing wrong here? Am I missing something?
What error or what problem did you encounter with Python's built-in datetime module?
Did you check the Meta parameter "_ts" https://doc.scrapinghub.com/scrapy-cloud.html#meta-parameters?