Use urljoin for pmedia

This commit is contained in:
blank X 2021-05-07 14:46:48 +07:00
parent 0c8e4d7466
commit 98599a5092
Signed by: blankie
GPG Key ID: CC15FC822C7F61F5
1 changed files with 2 additions and 2 deletions

View File

@ -10,7 +10,7 @@ import functools
import mimetypes
import traceback
from itertools import zip_longest
from urllib.parse import urlparse, urlunparse
from urllib.parse import urlparse, urlunparse, urljoin
import yaml
import asyncpraw
import aiohttp
@ -385,7 +385,7 @@ async def main():
tat += url
files = []
if pmedia:
pmedia = urlunparse(urlparse(pmedia, 'https'))
pmedia = urljoin(url, pmedia)
await _download_file(filename, pmedia)
files.append(filename)
if pdesc: