<s> from __future__ import absolute_import <EOL> import os <EOL> from svtplay_dl . service import Service <EOL> from svtplay_dl . fetcher . hds import hdsparse <EOL> from svtplay_dl . fetcher . hls import hlsparse <EOL> class Raw ( Service ) : <EOL> def get ( self ) : <EOL> data = self . get_urldata ( ) <EOL> if self . exclude ( self . options ) : <EOL> return <EOL> extention = False <EOL> filename = os . path . basename ( self . url [ : self . url . rfind ( "<STR_LIT:/>" ) - <NUM_LIT:1> ] ) <EOL> if self . options . output and os . path . isdir ( self . options . output ) : <EOL> self . options . output = os . path . join ( os . path . dirname ( self . options . output ) , filename ) <EOL> extention = True <EOL> elif self . options . output is None : <EOL> self . options . output = "<STR_LIT:%s>" % filename <EOL> extention = True <EOL> if self . url . find ( "<STR_LIT>" ) > <NUM_LIT:0> : <EOL> if extention : <EOL> self . options . output = "<STR_LIT>" % self . options . output <EOL> streams = hdsparse ( self . options , self . http . request ( "<STR_LIT>" , self . url , params = { "<STR_LIT>" : "<STR_LIT>" } ) , self . url ) <EOL> if streams : <EOL> for n in list ( streams . keys ( ) ) : <EOL> yield streams [ n ] <EOL> if self . url . find ( "<STR_LIT>" ) > <NUM_LIT:0> : <EOL> streams = hlsparse ( self . options , self . http . request ( "<STR_LIT>" , self . url ) , self . url ) <EOL> if extention : <EOL> self . options . output = "<STR_LIT>" % self . options . output <EOL> for n in list ( streams . keys ( ) ) : <EOL> yield streams [ n ] </s>
