mirror of
				https://gitlab.com/ytdl-org/youtube-dl.git
				synced 2025-11-04 07:47:08 -05:00 
			
		
		
		
	Merge remote-tracking branch 'sahutd/master'
This commit is contained in:
		@@ -62,6 +62,7 @@ from .fktv import (
 | 
			
		||||
    FKTVPosteckeIE,
 | 
			
		||||
)
 | 
			
		||||
from .flickr import FlickrIE
 | 
			
		||||
from .franceinter import FranceInterIE
 | 
			
		||||
from .francetv import (
 | 
			
		||||
    PluzzIE,
 | 
			
		||||
    FranceTvInfoIE,
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										31
									
								
								youtube_dl/extractor/franceinter.py
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										31
									
								
								youtube_dl/extractor/franceinter.py
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,31 @@
 | 
			
		||||
from __future__ import unicode_literals
 | 
			
		||||
 | 
			
		||||
import re
 | 
			
		||||
 | 
			
		||||
from .common import InfoExtractor
 | 
			
		||||
class FranceInterIE(InfoExtractor):
 | 
			
		||||
    
 | 
			
		||||
    _VALID_URL=r'http://(?:www\.)?franceinter\.fr/player/reecouter\?play=(?P<id>[0-9]{6})'
 | 
			
		||||
    _TEST={
 | 
			
		||||
           u'url':u'http://www.franceinter.fr/player/reecouter?play=793962',
 | 
			
		||||
           u'file':u'793962.mp3'
 | 
			
		||||
                  
 | 
			
		||||
           }
 | 
			
		||||
           
 | 
			
		||||
   
 | 
			
		||||
        
 | 
			
		||||
   
 | 
			
		||||
    def _real_extract(self,url):
 | 
			
		||||
 | 
			
		||||
        mobj = re.match(self._VALID_URL, url)
 | 
			
		||||
        video_id = mobj.group('id')
 | 
			
		||||
        
 | 
			
		||||
        webpage=self._download_webpage(url,video_id)
 | 
			
		||||
        
 | 
			
		||||
        title=self._search_regex(u'(?<=<span class="roll_overflow">)(.*)(?=</span></h1>)', webpage, u'title')
 | 
			
		||||
        
 | 
			
		||||
        video_url='http://www.franceinter.fr/'+self._search_regex(u'(?<=&urlAOD=)(.*)(?=&startTime)', webpage, u'video url')
 | 
			
		||||
        
 | 
			
		||||
        return{'id': video_id,u'url': video_url,u'title': title}
 | 
			
		||||
        
 | 
			
		||||
        
 | 
			
		||||
		Reference in New Issue
	
	Block a user