mirror of
				https://github.com/yt-dlp/yt-dlp.git
				synced 2025-11-04 08:35:12 +00:00 
			
		
		
		
	[facebook] Fix for m.facebook.com URLs
This commit is contained in:
		@@ -93,6 +93,15 @@ class FacebookIE(InfoExtractor):
 | 
				
			|||||||
            'title': '"What are you doing running in the snow?"',
 | 
					            'title': '"What are you doing running in the snow?"',
 | 
				
			||||||
            'uploader': 'FailArmy',
 | 
					            'uploader': 'FailArmy',
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					    }, {
 | 
				
			||||||
 | 
					        'url': 'https://m.facebook.com/story.php?story_fbid=1035862816472149&id=116132035111903',
 | 
				
			||||||
 | 
					        'md5': '1deb90b6ac27f7efcf6d747c8a27f5e3',
 | 
				
			||||||
 | 
					        'info_dict': {
 | 
				
			||||||
 | 
					            'id': '1035862816472149',
 | 
				
			||||||
 | 
					            'ext': 'mp4',
 | 
				
			||||||
 | 
					            'title': 'What the Flock Is Going On In New Zealand  Credit: ViralHog',
 | 
				
			||||||
 | 
					            'uploader': 'S. Saint',
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
    }, {
 | 
					    }, {
 | 
				
			||||||
        'url': 'https://www.facebook.com/video.php?v=10204634152394104',
 | 
					        'url': 'https://www.facebook.com/video.php?v=10204634152394104',
 | 
				
			||||||
        'only_matching': True,
 | 
					        'only_matching': True,
 | 
				
			||||||
@@ -105,9 +114,6 @@ class FacebookIE(InfoExtractor):
 | 
				
			|||||||
    }, {
 | 
					    }, {
 | 
				
			||||||
        'url': 'facebook:544765982287235',
 | 
					        'url': 'facebook:544765982287235',
 | 
				
			||||||
        'only_matching': True,
 | 
					        'only_matching': True,
 | 
				
			||||||
    }, {
 | 
					 | 
				
			||||||
        'url': 'https://m.facebook.com/story.php?story_fbid=1035862816472149&id=116132035111903',
 | 
					 | 
				
			||||||
        'only_matching': True,
 | 
					 | 
				
			||||||
    }]
 | 
					    }]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def _login(self):
 | 
					    def _login(self):
 | 
				
			||||||
@@ -200,7 +206,7 @@ class FacebookIE(InfoExtractor):
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
        if not video_data:
 | 
					        if not video_data:
 | 
				
			||||||
            server_js_data = self._parse_json(self._search_regex(
 | 
					            server_js_data = self._parse_json(self._search_regex(
 | 
				
			||||||
                r'handleServerJS\(({.+})\);', webpage, 'server js data'), video_id)
 | 
					                r'handleServerJS\(({.+})\);', webpage, 'server js data', default='{}'), video_id)
 | 
				
			||||||
            for item in server_js_data.get('instances', []):
 | 
					            for item in server_js_data.get('instances', []):
 | 
				
			||||||
                if item[1][0] == 'VideoConfig':
 | 
					                if item[1][0] == 'VideoConfig':
 | 
				
			||||||
                    video_data = video_data_list2dict(item[2][0]['videoData'])
 | 
					                    video_data = video_data_list2dict(item[2][0]['videoData'])
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user