how do i add prefix contain str into a list in scrapy

I changed the ‘title_url’ which is a list into a string and i am not getting output as i want,

import scrapy

class QuoteSpider(scrapy.Spider):
    name = 'quotes'
    base_url = 'https://www.yell.com'
    start_urls = ['https://www.yell.com/ucs/UcsSearchAction.do?scrambleSeed=770796459&keywords=hospitals&location=united+kingdom']

def parse(self, response):
    all_data = response.css('div.row.businessCapsule--mainRow')
    for data in all_data:
        title_url = str(data.css('a.businessCapsule--title::attr(href)').extract())
        final_url = self.base_url + title_url
        items = {
 
            'Title Url' : final_url,
        }
        yield items

ON output terminal shows like this:

"https://www.yell.com/['/biz/western-care-ltd-yeovil-8342726/']", "https://www.yell.com/['/biz/livingstonecare-service-corby-9019909/'],.....]

and i want output like this:

 ['https://www.yell.com/biz/western-care-ltd-yeovil-8342726/', 'https://www.yell.com/biz/livingstonecare-service-corby-9019909/'......]

Answer

Replace extract() with get()

Ex:

def parse(self, response):
    all_data = response.css('div.row.businessCapsule--mainRow')
    for data in all_data:
        title_url = data.css('a.businessCapsule--title::attr(href)').get()
        final_url = self.base_url + title_url
        items = {
 
            'Title Url' : final_url,
        }
        yield items

Note: .extract() returns a list of items.