Use urljoin for pmedia
This commit is contained in:
parent
0c8e4d7466
commit
98599a5092
|
@ -10,7 +10,7 @@ import functools
|
||||||
import mimetypes
|
import mimetypes
|
||||||
import traceback
|
import traceback
|
||||||
from itertools import zip_longest
|
from itertools import zip_longest
|
||||||
from urllib.parse import urlparse, urlunparse
|
from urllib.parse import urlparse, urlunparse, urljoin
|
||||||
import yaml
|
import yaml
|
||||||
import asyncpraw
|
import asyncpraw
|
||||||
import aiohttp
|
import aiohttp
|
||||||
|
@ -385,7 +385,7 @@ async def main():
|
||||||
tat += url
|
tat += url
|
||||||
files = []
|
files = []
|
||||||
if pmedia:
|
if pmedia:
|
||||||
pmedia = urlunparse(urlparse(pmedia, 'https'))
|
pmedia = urljoin(url, pmedia)
|
||||||
await _download_file(filename, pmedia)
|
await _download_file(filename, pmedia)
|
||||||
files.append(filename)
|
files.append(filename)
|
||||||
if pdesc:
|
if pdesc:
|
||||||
|
|
Loading…
Reference in New Issue