Skip to content

Commit

Permalink
remove fix from #31
Browse files Browse the repository at this point in the history
currently failing, works when i remove and have netrc
  • Loading branch information
scottstanie committed Oct 31, 2023
1 parent 7656a42 commit e955b0e
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions eof/download.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@
import requests
from dateutil.parser import parse

from .dataspace_client import ASFClient, DataspaceClient
from .dataspace_client import DataspaceClient
from .asf_client import ASFClient
from .log import logger
from .products import Sentinel, SentinelOrbit

Expand Down Expand Up @@ -92,7 +93,7 @@ def download_eofs(

if query:
logger.info("Attempting download from SciHub")
result = client.download_all(query, directory_path=save_dir)
result = client.download_all(query, output_directory=save_dir)
filenames.extend(item["path"] for item in result.downloaded.values())
dataspace_successful = True

Expand Down Expand Up @@ -137,13 +138,6 @@ def _download_and_write(url, save_dir=".", asf_user="", asf_password=""):
return [fname]

logger.info("Downloading %s", url)
# Fix URL
if "s1qc.asf.alaska.edu" in url:
url = (
"https://urs.earthdata.nasa.gov/oauth/authorize?response_type=code&client_id=BO_n7nTIlMljdvU6kRRB3g&redirect_uri=https://auth.asf.alaska.edu/login&state="
+ url
+ "&app_type=401"
)
# Add credentials
response = requests.get(url, auth=(asf_user, asf_password))
response.raise_for_status()
Expand Down

0 comments on commit e955b0e

Please sign in to comment.