Hello there,


Alright, so we've built the pipeline that will export the data to an Excel file and I told you that I don't want the pipeline to be tightly coupled to our Airbnb project, therefore we loaded the fields that are inside the DemoAirbnb item class and then we assigned a name to each column based on that field name.

Now here is your challenge:


In the XlsxWriter pipeline within the open_spider() method we set self.demo_obj = DemoAirbnbItem() , right ? 

Which means our pipeline truly depends on the DemoAirbnbItem and if you want to use that pipeline in another project you have to manually change the current Item class being used.

So your challenge is to figure how you can dynamically import the Item class from the items.py file so for future projects you won't have to manually import it.

When you finish your challenge you can either share with me your code in Github, through a private message or whatever works for you.

If you figured out how to do it, you can create a package and publish it in 'Pypi' and i'll make sure to include that package in the course with your name.

Good luck,
Ahmed.