mirror of
				https://github.com/yt-dlp/yt-dlp.git
				synced 2025-11-04 08:35:12 +00:00 
			
		
		
		
	[motherless] Make categories optional (Closes #8654)
This commit is contained in:
		@@ -54,6 +54,11 @@ class MotherlessIE(InfoExtractor):
 | 
				
			|||||||
                'thumbnail': 're:http://.*\.jpg',
 | 
					                'thumbnail': 're:http://.*\.jpg',
 | 
				
			||||||
                'age_limit': 18,
 | 
					                'age_limit': 18,
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            # no keywords
 | 
				
			||||||
 | 
					            'url': 'http://motherless.com/8B4BBC1',
 | 
				
			||||||
 | 
					            'only_matching': True,
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
    ]
 | 
					    ]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -86,7 +91,7 @@ class MotherlessIE(InfoExtractor):
 | 
				
			|||||||
            r'"thumb-member-username">\s+<a href="/m/([^"]+)"',
 | 
					            r'"thumb-member-username">\s+<a href="/m/([^"]+)"',
 | 
				
			||||||
            webpage, 'uploader_id')
 | 
					            webpage, 'uploader_id')
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        categories = self._html_search_meta('keywords', webpage)
 | 
					        categories = self._html_search_meta('keywords', webpage, default=None)
 | 
				
			||||||
        if categories:
 | 
					        if categories:
 | 
				
			||||||
            categories = [cat.strip() for cat in categories.split(',')]
 | 
					            categories = [cat.strip() for cat in categories.split(',')]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user