working - worldstarhiphop IE
Support for WorldStarHipHop
This commit is contained in:
		
							parent
							
								
									b3bcca0844
								
							
						
					
					
						commit
						64c78d50cc
					
				
							
								
								
									
										2
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							| @ -18,3 +18,5 @@ youtube-dl.tar.gz | |||||||
| cover/ | cover/ | ||||||
| updates_key.pem | updates_key.pem | ||||||
| *.egg-info | *.egg-info | ||||||
|  | 
 | ||||||
|  | *.flv | ||||||
|  | |||||||
| @ -3655,7 +3655,7 @@ class UstreamIE(InfoExtractor): | |||||||
|         return [info] |         return [info] | ||||||
| 
 | 
 | ||||||
| class WorldStarHipHopIE(InfoExtractor): | class WorldStarHipHopIE(InfoExtractor): | ||||||
|     _VALID_URL = r"""(http://(?:www|m).worldstar(?:candy|hiphop)\.com.*)""" |     _VALID_URL = r'http://(?:www|m)\.worldstar(?:candy|hiphop)\.com/videos/video\.php\?v=(?P<id>.*)' | ||||||
|     IE_NAME = u'WorldStarHipHop' |     IE_NAME = u'WorldStarHipHop' | ||||||
| 
 | 
 | ||||||
|     def _real_extract(self, url): |     def _real_extract(self, url): | ||||||
| @ -3686,8 +3686,6 @@ class WorldStarHipHopIE(InfoExtractor): | |||||||
|             title = 'World Start Hip Hop - %s' % time.ctime() |             title = 'World Start Hip Hop - %s' % time.ctime() | ||||||
| 
 | 
 | ||||||
|         _thumbnail = r"""rel="image_src" href="(.*)" />""" |         _thumbnail = r"""rel="image_src" href="(.*)" />""" | ||||||
| 
 |  | ||||||
|         print title |  | ||||||
|         mobj = re.search(_thumbnail, webpage_src) |         mobj = re.search(_thumbnail, webpage_src) | ||||||
| 
 | 
 | ||||||
|         # Getting thumbnail and if not thumbnail sets correct title for WSHH candy video. |         # Getting thumbnail and if not thumbnail sets correct title for WSHH candy video. | ||||||
| @ -3700,7 +3698,11 @@ class WorldStarHipHopIE(InfoExtractor): | |||||||
|                 title = mobj.group(1) |                 title = mobj.group(1) | ||||||
|             thumbnail = None |             thumbnail = None | ||||||
| 
 | 
 | ||||||
|  |         m = re.match(self._VALID_URL, url) | ||||||
|  |         video_id = m.group('id') | ||||||
|  |          | ||||||
|         results = [{ |         results = [{ | ||||||
|  |                     'id': video_id, | ||||||
|                     'url' : video_url, |                     'url' : video_url, | ||||||
|                     'title' : title, |                     'title' : title, | ||||||
|                     'thumbnail' : thumbnail, |                     'thumbnail' : thumbnail, | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user