Download your Portia 2.0 project and convert it to a scrapy project by using the Portia2Code tool: https://github.com/scrapinghub/portia2code

First, you need to install the portia2code library using:


$ pip install portia2code 


Then you need to download and extract your Portia project. You can do this through the API:

$ curl --user $SHUB_APIKEY: \
    'https://portia.scrapinghub.com/api/projects/$PROJECT_ID/download' > project.zip
$ unzip project.zip -d project


Finally, you can convert your project using:


$ portia_porter project converted_output_dir


For additional information you can follow this tutorial or the documentation.