Skip to content

download issues with planes file #21

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
simonpcouch opened this issue Sep 7, 2023 · 4 comments
Open

download issues with planes file #21

simonpcouch opened this issue Sep 7, 2023 · 4 comments

Comments

@simonpcouch
Copy link
Owner

I'm able to download the FAA's releasable aircraft data in a couple seconds from my browser, but see timeout errors whenever I try to download via download.file():

out_file <- tempfile()

out <- 
  utils::download.file(
    "https://registry.faa.gov/database/yearly/ReleasableAircraft.2022.zip", 
    out_file
  )
#> Warning in
#> utils::download.file("https://registry.faa.gov/database/yearly/ReleasableAircraft.2022.zip",
#> : URL 'https://registry.faa.gov/database/yearly/ReleasableAircraft.2022.zip':
#> Timeout of 60 seconds was reached
#> Error in utils::download.file("https://registry.faa.gov/database/yearly/ReleasableAircraft.2022.zip", : cannot open URL 'https://registry.faa.gov/database/yearly/ReleasableAircraft.2022.zip'

Created on 2023-09-07 with reprex v2.0.2

simonpcouch added a commit that referenced this issue Sep 7, 2023
Now passing along a user agent.
@ismayc
Copy link
Contributor

ismayc commented May 6, 2025

I'm getting the same issue with https://registry.faa.gov/database/yearly/ReleasableAircraft.zip . I'm exploring other options.

@ismayc
Copy link
Contributor

ismayc commented May 6, 2025

I tried a lot of different things here with curl and httr, but each time planes_tmp refers back to an HTML file instead of the ZIP file. I wonder if they have some restrictions set on non-browser downloads?

readLines(planes_tmp, n = 10)
# [1] "<!DOCTYPE html>"
# [2] "\<html lang="en" dir="ltr">"
# [3] "<head>"
# [4] "  \<meta charset="utf-8" />"
# [5] "\<script async src="[https://www.googletagmanager.com/gtag/js?id=UA-18660041-1\\">](https://www.googletagmanager.com/gtag/js?id=UA-18660041-1\%22>)</script>"
# [6] "<script>window\.dataLayer = window\.dataLayer || \[];function gtag(){dataLayer.push(arguments)};gtag("js", new Date());gtag("set", "developer\_id.dMDhkMT", true);gtag("config", "UA-18660041-1", {"groups":"default","anonymize\_ip"\:true,"page\_placeholder":"PLACEHOLDER\_page\_path"});gtag("config", "G-XLYJSDG13C", {"groups":"default","page\_placeholder":"PLACEHOLDER\_page\_location"});gtag("config", "G-0623JYSC1Q", {"groups":"default","page\_placeholder":"PLACEHOLDER\_page\_location"});//gtag('config', 'UA-33523145-1');</script>"
# [7] "<script>(function(w,d,s,l,i){w\[l]=w\[l]||\[];w\[l].push({'gtm.start':"
# [8] "new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)\[0],"
# [9] "j=d.createElement(s),dl=l!='dataLayer'?'\&l='+l:'';j.async=true;j.src="
# [10] "'[[https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f)](https://www.googletagmanager.com/gtm.js?id=%27+i+dl;f.parentNode.insertBefore(j,f))](https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore%28j,f%29);"

Given the file is 60 MB in size, I'm not sure of a good solution for including it beyond just hosting the file online and pointing to that instead?

@simonpcouch
Copy link
Owner Author

Ope, bummed to hear that this kicked in again. Just noting that I've seen this, not sure when this will come to the top of the to-do.

@ismayc
Copy link
Contributor

ismayc commented May 9, 2025

No worries! Just figured I could try to fix this as well as the other issue and then got into this rabbit hole :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants