forked from ruangrupa/konfluks
		
	fix issue where posts with enclosures would not download files because of missing dir
This commit is contained in:
		| @ -155,6 +155,8 @@ def parse_enclosures(post_dir, entry): | |||||||
|         if "type" in e: |         if "type" in e: | ||||||
|             print("found enclosed media", e.type) |             print("found enclosed media", e.type) | ||||||
|             if "image/" in e.type: |             if "image/" in e.type: | ||||||
|  |                 if not os.path.exists(post_dir): #this might be redundant with create_post | ||||||
|  |                     os.makedirs(post_dir) | ||||||
|                 featured_image = grab_media(post_dir, e.href) |                 featured_image = grab_media(post_dir, e.href) | ||||||
|                 media_item = urlparse(e.href).path.split('/')[-1] |                 media_item = urlparse(e.href).path.split('/')[-1] | ||||||
|                 entry["featured_image"] = media_item |                 entry["featured_image"] = media_item | ||||||
|  | |||||||
		Reference in New Issue
	
	Block a user