GithubHelp home page GithubHelp logo

Comments (14)

lfaoro avatar lfaoro commented on June 23, 2024 1

maybe a loop through the "result_info" could easy solve it

yes, that's one options, maybe another option is to not limit the result page if CF api supports it.

will issue a fix by tomorrow; thank you for the time invested reporting this @hebbet

from flares.

lfaoro avatar lfaoro commented on June 23, 2024

Yes, all zones should be exported. I don't have 20 zones to test this, so I'll need your help with the testing.

Let's say you have 30 zones, you run the command and only 20 zones get exported and it finishes?

I think maybe CloudFlare is limiting the export to 20 zones, I will check the API I'm calling and give you more info.

from flares.

hebbet avatar hebbet commented on June 23, 2024

Yes, all zones should be exported. I don't have 20 zones to test this, so I'll need your help with the testing.

yes i can help testing. we have around 400 domains in CF

Let's say you have 30 zones, you run the command and only 20 zones get exported and it finishes?

yes.

I think maybe CloudFlare is limiting the export to 20 zones,

List Zones default value is 20 per page.

https://api.cloudflare.com/#zone-list-zones

  "result_info": {
    "page": 1,
    "per_page": 20,
    "count": 1,
    "total_count": 2000
  }

maybe a loop through the "result_info" could easy solve it

from flares.

hebbet avatar hebbet commented on June 23, 2024

any news on that?

from flares.

lfaoro avatar lfaoro commented on June 23, 2024

hello @hebbet, I'm very sorry for keeping you waiting on this issue this long -- totally forgot about it.

I pushed a fix right now, I have no way to test it -- lemme know if it solves your problem.

as you suggested I loop through the result_info and calculate how many requests do we need to send in order to obtain all data total_count / per_page

then we just keep extracting the data for every page with a new request

from flares.

hebbet avatar hebbet commented on June 23, 2024

i pulled the image and tried again:
docker run -it --rm -e CF_API_KEY="$CF_API_KEY" -e CF_API_EMAIL="$CF_API_EMAIL" lfaoro/flares --all
DEBUG: [map[code:6003 error_chain:[map[code:6105 message:Invalid Content-Type header, valid values are application/json,multipart/form-data]] message:Invalid request headers]]
Error: 🔥: cloudflare: domain not found

from flares.

lfaoro avatar lfaoro commented on June 23, 2024

the docker build is still in progress:
image

you will have to pull the new image once it's done in order to have the new code running

I suggest you pull every now and then, once you receive a new image, you know to have the new app now

from flares.

lfaoro avatar lfaoro commented on June 23, 2024

I created the new image locally to confirm the new code works as expected: http://share.vlct.io/0f9d28

Just need you to confirm it works for 400 domains now :)

from flares.

lfaoro avatar lfaoro commented on June 23, 2024

@hebbet -- does it work as expected?

from flares.

hebbet avatar hebbet commented on June 23, 2024

no :-(

docker run -it --rm -e CF_API_KEY="$CF_API_KEY" -e CF_API_EMAIL="$CF_API_EMAIL" lfaoro/flares -a
Unable to find image 'lfaoro/flares:latest' locally
latest: Pulling from lfaoro/flares
bdf0201b3a05: Pull complete
f402d13f8c6a: Pull complete
1697c109f50e: Pull complete
Digest: sha256:fe241ec3e641f58d3164f1f77c589c500301648e653b3aa11c89ad317efd7060
Status: Downloaded newer image for lfaoro/flares:latest
DEBUG: [map[code:6003 error_chain:[map[code:6105 message:Invalid Content-Type header, valid values are application/json,multipart/form-data]] message:Invalid request headers]]
Error: 🔥: cloudflare: domain not found

from flares.

lfaoro avatar lfaoro commented on June 23, 2024

Try again, I removed that faulty header.

$ docker pull lfaoro/flares
$ docker run -it --rm -e CF_API_KEY="$CF_API_KEY" -e CF_API_EMAIL="$CF_API_EMAIL" lfaoro/flares --all

from flares.

hebbet avatar hebbet commented on June 23, 2024

we are getting closer, but with a new error:

DEBUG: [map[code:6008 error_chain:[map[code:11001 message:page variable must be a number] map[code:11002 message:page variable must be a number]] message:Invalid request parameters]]

from flares.

lfaoro avatar lfaoro commented on June 23, 2024

Good! Progress :D

I'm coding in the blind, I don't have a way to test pagination -- gotta imagine what's going on.

No worries, will try again, we'll get this issue solved one way or another.

from flares.

lfaoro avatar lfaoro commented on June 23, 2024

@hebbet -- I've refactored the whole tool, now you should be able to handle as many domains as you want in one go.

$ flares --all --export

from flares.

Related Issues (13)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.