title: How to use 2 yield items from 2 different methods in scrapy?
body: <p>I am new to python and scrapy. I am yielding 2 items from 2 different methods, first one is for first-page data, the second one is for second-page data. I am not able to save the data in same order, the second item saving after the first item, but I need to save both at a time.
      Thanks in advance.</p>
  
  <pre><code>class FirstPipeline(object):
  
      @classmethod
      def from_crawler(cls, crawler):
          pipeline = cls()
          crawler.signals.connect(pipeline.spider_opened, signals.spider_opened)
          crawler.signals.connect(pipeline.spider_closed, signals.spider_closed)
          return pipeline
  
      def spider_opened(self, spider):
          current_date = datetime.now().strftime("%Y%m%d")
          filename = 'License_Vehicle Inspection Stations_NY_CurationReady_' + current_date +'_v1.csv'
          self.file = open(filename, 'w+b')
          self.exporter = CsvItemExporter(self.file, delimiter = '|')
  
          self.exporter.csv_writer.writerow(["Premises Name","Principal's Name","","Trade Name","Zone","County","Address/zone","License Class","License Type Code","License Type","Expiration Date","License Status","Serial Number","Credit Group","Filing Date","Effective Date"," "," "," "," "])
          self.exporter.fields_to_export = ["company_name","mixed_name","mixed_subtype","dba_name","zone","county","location_address_string","licence_class","licence_type_code","permity_subtype","permit_lic_exp_date","permit_licence_status","permit_lic_no","credit_group","permit_lic_eff_date","permit_applied_date","permit_type","url","source_name","ingestion_timestamp"]
          self.exporter.start_exporting()
  
  
      def spider_closed(self, spider):
          self.exporter.finish_exporting()
          self.file.close()
  
      def process_item(self, item, spider):
          print("got the item in pipeline")
          self.exporter.export_item(item)
          return item
  
  class SecondPipeline(object):
  
      def process_item(self, item, spider):
          if isinstance(item, SecondItem):
              pass
  
          return item
  </code></pre>