import scrapy


class QuotesSpider(scrapy.Spider):
    name = "workout"
    start_urls = [
        'https://www.meinefitness.net/pull-over/',
        'https://www.meinefitness.net/negativ-bankdruecken/',
        'https://www.meinefitness.net/bankdruecken/',
        'https://www.meinefitness.net/liegestuetze/',
        'https://www.meinefitness.net/frauenliegestuetze/',
        'https://www.meinefitness.net/butterfly-uebung/',
        'https://www.meinefitness.net/kurzhantel-bankdruecken/',
        'https://www.meinefitness.net/fliegende/',
        'https://www.meinefitness.net/butterfly-am-kabelzug/',
        'https://www.meinefitness.net/good-mornings/',
        'https://www.meinefitness.net/ueberzuege-kabel/',
        'https://www.meinefitness.net/kurzhantel-schraegbankdruecken/',
        'https://www.meinefitness.net/bankdruecken/',
        'https://www.meinefitness.net/fliegende-schraegbank/',
        'https://www.meinefitness.net/liegestuetze/',
        'https://www.meinefitness.net/frauenliegestuetze/',
        'https://www.meinefitness.net/butterfly-uebung/',
        'https://www.meinefitness.net/kurzhantel-bankdruecken/',
        'https://www.meinefitness.net/kurzhantel-kreuzheben/',
        'https://www.meinefitness.net/einbeiniges-kreuzheben/',
        'https://www.meinefitness.net/kettlebell-military-press/',
        'https://www.meinefitness.net/kettlebell-swings/',
        'https://www.meinefitness.net/kettlebell-deadlift/',
        'https://www.meinefitness.net/kreuzheben/',
        'https://www.meinefitness.net/rumaenisches-kreuzheben/',
        'https://www.meinefitness.net/sumo-kreuzheben/',
        'https://www.meinefitness.net/langhantel-rudern/',
        'https://www.meinefitness.net/hyperextension/',
        'https://www.meinefitness.net/schraegbankdruecken/',
        'https://www.meinefitness.net/fliegende/',
        'https://www.meinefitness.net/arnold-dips/',
        'https://www.meinefitness.net/schulterdruecken-kurzhantel/',
        'https://www.meinefitness.net/schulterdruecken/',
        'https://www.meinefitness.net/seitheben/',
        'https://www.meinefitness.net/frontheben-langhantel/',
        'https://www.meinefitness.net/military-press/',
        'https://www.meinefitness.net/butterfly-uebung/',
        'https://www.meinefitness.net/handstand-push-ups/',
        'https://www.meinefitness.net/nackendruecken/',
        'https://www.meinefitness.net/reverse-flys/',
        'https://www.meinefitness.net/butterfly-reverse/',
        'https://www.meinefitness.net/langhantel-rudern/',
        'https://www.meinefitness.net/military-press/',
        'https://www.meinefitness.net/t-bar-rudern/',
        'https://www.meinefitness.net/shrugs/',
        'https://www.meinefitness.net/rudern-am-kabelzug/',
        'https://www.meinefitness.net/aufrechtes-rudern/',
        'https://www.meinefitness.net/latzug-enger-griff/',
        'https://www.meinefitness.net/rudern-am-geraet/',
        'https://www.meinefitness.net/latzug-zum-nacken/',
        'https://www.meinefitness.net/klimmzuege-am-geraet/',
        'https://www.meinefitness.net/enge-klimmzuege/',
        'https://www.meinefitness.net/klimmzuege/',
        'https://www.meinefitness.net/einarmiges-rudern/',
        'https://www.meinefitness.net/butterfly-reverse/',
        'https://www.meinefitness.net/langhantel-rudern/',
        'https://www.meinefitness.net/t-bar-rudern/',
        'https://www.meinefitness.net/latzug/',
        'https://www.meinefitness.net/shrugs/',
        'https://www.meinefitness.net/kurzhantel-rudern/',
        'https://www.meinefitness.net/langhantel-shrugs/',
        'https://www.meinefitness.net/rudern-am-kabelzug/',
        'https://www.meinefitness.net/aufrechtes-rudern/',
        'https://www.meinefitness.net/schulterdruecken/',
        'https://www.meinefitness.net/nackendruecken/',
        'https://www.meinefitness.net/frontheben-langhantel/',
        'https://www.meinefitness.net/military-press/',
        'https://www.meinefitness.net/schulterdruecken-kurzhantel/',
        'https://www.meinefitness.net/frontheben/',
        'https://www.meinefitness.net/kettlebell-clean-and-press/',
        'https://www.meinefitness.net/handstand-push-ups/',
        'https://www.meinefitness.net/kabelziehen-ueber-kreuz/',
        'https://www.meinefitness.net/frontheben-am-kabelzug/',
        'https://www.meinefitness.net/arnold-dips/',
        'https://www.meinefitness.net/bankdruecken/',
        'https://www.meinefitness.net/liegestuetze/',
        'https://www.meinefitness.net/frauenliegestuetze/',
        'https://www.meinefitness.net/butterfly-uebung/',
        'https://www.meinefitness.net/kurzhantel-bankdruecken/',
        'https://www.meinefitness.net/fliegende/',
        'https://www.meinefitness.net/reverse-curls/',
        'https://www.meinefitness.net/hammercurls-sitzend/',
        'https://www.meinefitness.net/hammercurls/',
        'https://www.meinefitness.net/drag-curls/',
        'https://www.meinefitness.net/langhantel-rudern/',
        'https://www.meinefitness.net/langhantel-curls/',
        'https://www.meinefitness.net/reverse-curls/',
        'https://www.meinefitness.net/latzug/',
        'https://www.meinefitness.net/scottcurls/',
        'https://www.meinefitness.net/einarmiges-rudern/',
        'https://www.meinefitness.net/scottcurls-kurzhantel/',
        'https://www.meinefitness.net/reverse-curls/',
        'https://www.meinefitness.net/hammercurls-sitzend/',
        'https://www.meinefitness.net/bizepscurls/',
        'https://www.meinefitness.net/hammercurls/',
        'https://www.meinefitness.net/konzentrationscurls/',
        'https://www.meinefitness.net/klimmzuege-am-geraet/',
        'https://www.meinefitness.net/enge-klimmzuege/',
        'https://www.meinefitness.net/klimmzuege/',
        'https://www.meinefitness.net/plank-unterarmstuetz/',
        'https://www.meinefitness.net/scissor-kicks/',
        'https://www.meinefitness.net/hip-thrust/',
        'https://www.meinefitness.net/sit-ups-schraegbank/',
        'https://www.meinefitness.net/crunches-am-kabelzug/',
        'https://www.meinefitness.net/crunches-arme-seitlich/',
        'https://www.meinefitness.net/criss-cross/',
        'https://www.meinefitness.net/seitliche-crunches/',
        'https://www.meinefitness.net/crunches/',
        'https://www.meinefitness.net/reverse-crunches/',
        'https://www.meinefitness.net/sit-ups/',
        'https://www.meinefitness.net/bauchpresse/',
        'https://www.meinefitness.net/bankdruecken/',
        'https://www.meinefitness.net/schraegbankdruecken/',
        'https://www.meinefitness.net/french-press-trizeps/',
        'https://www.meinefitness.net/kettlebell-clean-and-press/',
        'https://www.meinefitness.net/trizeps-kickbacks/',
        'https://www.meinefitness.net/kurzhantel-bankdruecken/',
        'https://www.meinefitness.net/enge-liegestuetze/',
        'https://www.meinefitness.net/handstand-push-ups/',
        'https://www.meinefitness.net/dips-uebungen/',
        'https://www.meinefitness.net/gironda-dips/',
        'https://www.meinefitness.net/dips-an-der-maschine/',
        'https://www.meinefitness.net/einarmige-liegestuetze/',
        'https://www.meinefitness.net/liegestuetze/',
        'https://www.meinefitness.net/frauenliegestuetze/',
        'https://www.meinefitness.net/arnold-dips/',
        'https://www.meinefitness.net/trizepsdruecken/',
        'https://www.meinefitness.net/plank-unterarmstuetz/',
        'https://www.meinefitness.net/knieheben/',
        'https://www.meinefitness.net/scissor-kicks/',
        'https://www.meinefitness.net/beinheben-liegend/',
        'https://www.meinefitness.net/klappmesser-uebung/',
        'https://www.meinefitness.net/beinheben-haengend/',
        'https://www.meinefitness.net/beinheben/',
        'https://www.meinefitness.net/criss-cross/',
        'https://www.meinefitness.net/reverse-crunches/',
        'https://www.meinefitness.net/bauchpresse/',
        'https://www.meinefitness.net/plank-unterarmstuetz/',
        'https://www.meinefitness.net/hueftrollen/',
        'https://www.meinefitness.net/wood-chops/',
        'https://www.meinefitness.net/sit-ups-schraegbank/',
        'https://www.meinefitness.net/crunches-am-kabelzug/',
        'https://www.meinefitness.net/crunches-arme-seitlich/',
        'https://www.meinefitness.net/criss-cross/',
        'https://www.meinefitness.net/seitliche-crunches/',
        'https://www.meinefitness.net/bauchpresse/',
        'https://www.meinefitness.net/abduktion-am-geraet/',
        'https://www.meinefitness.net/hackenschmidt-maschine/',
        'https://www.meinefitness.net/froggers/',
        'https://www.meinefitness.net/froggers/',
        'https://www.meinefitness.net/mountain-climbers/',
        'https://www.meinefitness.net/kettlebell-deadlift/',
        'https://www.meinefitness.net/kettlebell-goblet-squat/',
        'https://www.meinefitness.net/burpees/',
        'https://www.meinefitness.net/kreuzheben/',
        'https://www.meinefitness.net/rumaenisches-kreuzheben/',
        'https://www.meinefitness.net/kniebeugen/',
        'https://www.meinefitness.net/kniebeugen-mit-kurzhantel/',
        'https://www.meinefitness.net/ausfallschritt-langhantel/',
        'https://www.meinefitness.net/hackenschmidt-kniebeuge/',
        'https://www.meinefitness.net/frontkniebeugen/',
        'https://www.meinefitness.net/seitlicher-ausfallschritt/',
        'https://www.meinefitness.net/hip-thrust/',
        'https://www.meinefitness.net/ausfallschritt/',
        'https://www.meinefitness.net/sumo-kreuzheben/',
        'https://www.meinefitness.net/mountain-climbers/',
        'https://www.meinefitness.net/kurzhantel-kreuzheben/',
        'https://www.meinefitness.net/einbeiniges-kreuzheben/',
        'https://www.meinefitness.net/kettlebell-swings/',
        'https://www.meinefitness.net/kettlebell-deadlift/',
        'https://www.meinefitness.net/kettlebell-goblet-squat/',
        'https://www.meinefitness.net/burpees/',
        'https://www.meinefitness.net/kreuzheben/',
        'https://www.meinefitness.net/kniebeugen/',
        'https://www.meinefitness.net/kniebeugen-mit-kurzhantel/',
        'https://www.meinefitness.net/ausfallschritt-langhantel/',
        'https://www.meinefitness.net/hackenschmidt-kniebeuge/',
        'https://www.meinefitness.net/frontkniebeugen/',
        'https://www.meinefitness.net/beinbeugen/',
        'https://www.meinefitness.net/beinbeugen-sitzend/',
        'https://www.meinefitness.net/seitlicher-ausfallschritt/',
        'https://www.meinefitness.net/hip-thrust/',
        'https://www.meinefitness.net/ausfallschritt/',
        'https://www.meinefitness.net/abduktion-am-geraet/',
        'https://www.meinefitness.net/abduktion-am-geraet/',
        'https://www.meinefitness.net/beinbeugen/',
        'https://www.meinefitness.net/hackenschmidt-maschine/',
        'https://www.meinefitness.net/froggers/',
        'https://www.meinefitness.net/wadenheben-sitzend/',
        'https://www.meinefitness.net/wadenheben/',
        'https://www.meinefitness.net/wadenheben-stehend/',
        'https://www.meinefitness.net/seilspringen/',
        'https://www.meinefitness.net/kettlebell-swings/',
        'https://www.meinefitness.net/kettlebell-goblet-squat/',
        'https://www.meinefitness.net/burpees/',
        'https://www.meinefitness.net/kniebeugen/',
        'https://www.meinefitness.net/kniebeugen-mit-kurzhantel/',
        'https://www.meinefitness.net/mountain-climbers/',
        'https://www.meinefitness.net/kettlebell-swings/',
        'https://www.meinefitness.net/kettlebell-goblet-squat/',
        'https://www.meinefitness.net/burpees/',
        'https://www.meinefitness.net/kniebeugen/',
        'https://www.meinefitness.net/kniebeugen-mit-kurzhantel/',
        'https://www.meinefitness.net/ausfallschritt-langhantel/',
        'https://www.meinefitness.net/ausfallschritt/',
        'https://www.meinefitness.net/hackenschmidt-kniebeuge/',
        'https://www.meinefitness.net/frontkniebeugen/',
        'https://www.meinefitness.net/scherenschlag/',
        'https://www.meinefitness.net/seitlicher-ausfallschritt/',
        'https://www.meinefitness.net/adduktion-am-geraet'
    ]

    def parse(self, response):
        titel=str(response.css('h1.entry-title::text').get()).replace("ö","oe").replace("Ö","Oe").replace("ä","ae").replace("Ä","Ae").replace("ü","ue").replace("Ü","ue")
        details=response.css('div.uebungsbox p::text').getall()
        muskelgruppen=""
        for muskel in response.css('div.uebungsbox li::text').getall():
            muskelgruppen=muskelgruppen+muskel+","

        muskelBild=response.css('div.muskelgruppe img::attr(src)').get()

        ablauf=""

        for strong in response.css('table.evergreen-uebung li::text').getall():
            ablauf=ablauf+str(strong)+";"


        yield{
            'Titel':titel,
            'Equipment':details[0].replace("ö","oe").replace("Ö","Oe").replace("ä","ae").replace("Ä","Ae").replace("ü","ue").replace("Ü","ue").replace("ß","ss"),
            'Schwierigkeit':details[1].replace("ö","oe").replace("Ö","Oe").replace("ä","ae").replace("Ä","Ae").replace("ü","ue").replace("Ü","ue").replace("ß","ss"),
            'AndereNamen':details[2].replace("ö","oe").replace("Ö","Oe").replace("ä","ae").replace("Ä","Ae").replace("ü","ue").replace("Ü","ue").replace("ß","ss"),
            'Muskeln':muskelgruppen.replace("ö","oe").replace("Ö","Oe").replace("ä","ae").replace("Ä","Ae").replace("ü","ue").replace("Ü","ue").replace("ß","ss"),
            'Bild':muskelBild,
            'Ablauf=': ablauf.replace("ö","oe").replace("Ö","Oe").replace("ä","ae").replace("Ä","Ae").replace("ü","ue").replace("Ü","ue").replace("ß","ss").replace("</li>","").replace("<li>","")
        }







