mirror of
https://github.com/Garmelon/PFERD.git
synced 2026-04-13 07:55:05 +02:00
remove false help text and fix httpx auth
This commit is contained in:
parent
411d4b91d5
commit
07218e6cab
2 changed files with 4 additions and 10 deletions
|
|
@ -6,7 +6,6 @@ from dataclasses import dataclass, field
|
|||
from typing import Any, Dict, List, Optional
|
||||
|
||||
import httpx
|
||||
import httpx.auth
|
||||
|
||||
from .organizer import Organizer
|
||||
from .tmp_dir import TmpDir
|
||||
|
|
@ -42,12 +41,9 @@ class HttpDownloader:
|
|||
self._client = self._build_client()
|
||||
|
||||
def _build_client(self) -> httpx.Client:
|
||||
client = httpx.Client()
|
||||
if self._username and self._password:
|
||||
client.auth = httpx.auth.HTTPBasicAuth(
|
||||
self._username, self._password
|
||||
)
|
||||
return client
|
||||
return httpx.Client(auth=(self._username, self._password))
|
||||
return httpx.Client()
|
||||
|
||||
def download_all(self, infos: List[HttpDownloadInfo]) -> None:
|
||||
"""
|
||||
|
|
|
|||
|
|
@ -156,8 +156,7 @@ class Pferd(Location):
|
|||
be downloaded. Can save bandwidth and reduce the number of httpx.
|
||||
(default: {download_modified_or_new})
|
||||
clean {bool} -- Whether to clean up when the method finishes.
|
||||
timeout {int} -- The download timeout for opencast videos. Sadly needed due to a
|
||||
httpx bug.
|
||||
timeout {int} -- The download timeout for opencast videos.
|
||||
file_conflict_resolver {FileConflictResolver} -- A function specifying how to deal
|
||||
with overwriting or deleting files. The default always asks the user.
|
||||
"""
|
||||
|
|
@ -290,8 +289,7 @@ class Pferd(Location):
|
|||
be downloaded. Can save bandwidth and reduce the number of httpx.
|
||||
(default: {download_modified_or_new})
|
||||
clean {bool} -- Whether to clean up when the method finishes.
|
||||
timeout {int} -- The download timeout for opencast videos. Sadly needed due to a
|
||||
httpx bug.
|
||||
timeout {int} -- The download timeout for opencast videos.
|
||||
file_conflict_resolver {FileConflictResolver} -- A function specifying how to deal
|
||||
with overwriting or deleting files. The default always asks the user.
|
||||
"""
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue