Skip to content

Commit

Permalink
Fixed custom filenames
Browse files Browse the repository at this point in the history
  • Loading branch information
UltimaHoarder committed Jun 13, 2021
1 parent 040af16 commit d5adabc
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions apis/api_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,19 @@
import python_socks
import requests
from aiohttp import ClientSession
from aiohttp.client_exceptions import (ClientConnectorError, ClientOSError,
ClientPayloadError, ContentTypeError,
ServerDisconnectedError)
from aiohttp.client_exceptions import (
ClientConnectorError,
ClientOSError,
ClientPayloadError,
ContentTypeError,
ServerDisconnectedError,
)
from aiohttp.client_reqrep import ClientResponse
from aiohttp_socks import ChainProxyConnector, ProxyConnector, ProxyType
from database.models.media_table import media_table

from apis.onlyfans.classes import create_user
from yarl import URL

path = up(up(os.path.realpath(__file__)))
os.chdir(path)
Expand Down Expand Up @@ -273,7 +278,8 @@ async def check(download_item: media_table, response: ClientResponse):
temp_response = [
response
for response in responses
if response and response.url.name == download_item.filename
if response
and URL.human_repr(response.url) == download_item.link
]
if temp_response:
temp_response = temp_response[0]
Expand Down

0 comments on commit d5adabc

Please sign in to comment.