question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

I think the download URL in EE has changed.

See original GitHub issue

The source code below is the source code I added the status_code code to check. Is there any place to know the information of the download URL? Or does anyone know?

url = "https://earthexplorer.usgs.gov/download/12864/LC81150342020112LGN00/STANDARD/EE" def _download(self, url, output_dir, chunk_size=1024): """Download remote file given its URL.""" with self.session.get(url, stream=True, allow_redirects=True) as r: if r.status_code == 404: raise "404 not found..." file_size = int(r.headers['Content-Length']) Common.Parameter.FileSize = file_size with tqdm(total=file_size, unit_scale=True, unit='B', unit_divisor=1024) as pbar: local_filename = r.headers['Content-Disposition'].split('=')[-1] local_filename = os.path.join(output_dir, local_filename) with open(local_filename, 'wb') as f: for chunk in r.iter_content(chunk_size=chunk_size): if chunk: f.write(chunk) pbar.update(chunk_size) return local_filename

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:13 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
yannforgetcommented, Aug 4, 2020

Thanks! v0.8 should fix that

1reaction
gavriloboscommented, Aug 3, 2020

Thank you so very much.

The pylandsat library works perfectly.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Servlet Upload File and Download File Example - DigitalOcean
Since I have written a lot about java servlet recently, I thought to provide a sample example of servlet file upload to server...
Read more >
Download items from the web using Safari on Mac
Tip: To change where downloaded items are saved on your Mac, choose Safari > Settings, click General, then click the “File download location”...
Read more >
My EE - Apps on Google Play
One little tap for complete control and all the help you need. When life's moving fast, you need a super-speedy way to manage...
Read more >
Repository files API - GitLab Docs
URL -encoded full path to new file, such as lib%2Fclass%2Erb . ref, string, yes, The name of branch, tag or commit. Default is...
Read more >
Apache Tomcat® - Welcome!
This conversion is performed using the Apache Tomcat migration tool for Jakarta EE tool which is also available as a separate download for...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found