Made this scraper that scrapes data correctly but the problem is with exporting it to csv. The default - o filname.csvdoesn't paste data in the correct order. Need some guidance to do it.The item['name'] should in first column and item['link'] in second. This is the code.
# -*- coding: utf-8 -*-
import scrapy
from scrapy.linkextractors import LinkExtractor
from scrapy.spiders import CrawlSpider, Rule
import re
from ..items import WebscItem
class YuSpider(CrawlSpider):
    name = 'yu'
    allowed_domains = ['farfeshplus.com',
                       'wintv.live']
    start_urls = ['https://www.farfeshplus.com/Video.asp?ZoneID=297']
    rules = (
        Rule(LinkExtractor(restrict_xpaths='//td[@class="text6"]'), callback='parse_item', follow=True),
    )
    def parse_item(self, response):
        items = WebscItem()
        for url in response.xpath('//html'):
            items['name'] = url.xpath('//h1/div/text()').extract()
            yield items
            frames = url.xpath('//iframe[@width="750"]/@src').extract_first()
            yield scrapy.Request(url=frames, callback=self.parse_frame)
    def parse_frame(self, response):
        items = WebscItem()
        URL = response.xpath('//body/script').extract_first()
        
        mp4 = re.compile(r"(?<=mp4:\s\[\')(.*)\'\]")
        link = mp4.findall(URL)[0]
       
        items['link'] = link
        yield items
 
     
     
    