Start a new topic
Answered

How to get the project id in a scrapy job

I want to get the scrapy project id that zyte generates, is there any other method different to the os.getenv('SCRAPY_JOB')?. This method generates  a response in the format  "project_id/spider_id/job_id" but I only want the project id, is there a method to extract directly the project id or do I have to use split functions to get it? 


Best Answer

This is the default response format  "project_id/spider_id/job_id". Yes, you can split functions to get the project ID.

1 Comment

Answer

This is the default response format  "project_id/spider_id/job_id". Yes, you can split functions to get the project ID.


1 person likes this
Login to post a comment