Skip to content
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

Is this documented somewhere? #104

Open
DaVyper opened this issue Jun 27, 2023 · 8 comments
Open

Is this documented somewhere? #104

DaVyper opened this issue Jun 27, 2023 · 8 comments

Comments

@DaVyper
Copy link

DaVyper commented Jun 27, 2023

Also: Is there a way to retry requests, when they timeout?

--error-handling=xx=retry

for an error code xx. Or xx for all 2 digit codes

Originally posted by @benibela in #9 (comment)

How can i get it to retry on -3 timeout, and why isn't xxx retrying on 504 errors (gateway timeout)

i've tried quoted and not:
--error-handling=""=retry --error-handling="-"=retry --error-handling="x"=retry --error-handling="-x"=retry --error-handling="xx"=retry --error-handling="-xx"=retry --error-handling="xxx"=retry --error-handling="-xxx"=retry --error-handling="xxxx"=retry --error-handling="-xxxx"=retry --error-handling=retry
and
--error-handling==retry --error-handling=-=retry --error-handling=x=retry --error-handling=-x=retry --error-handling=xx=retry --error-handling=-xx=retry --error-handling=xxx=retry --error-handling=-xxx=retry --error-handling=xxxx=retry --error-handling=-xxxx=retry

nothing seems to get it to retry... and everytime it's run it will again fail with a timeout randomly in the list of 1000's of sites via -f, but is successful other times (its a timeout simply retrying fixes it nearly everytime unless the server is down)

Error:
Internet/HTTP Error: 504
when talking to: https:/<snip>/blah.json
Internet Error: -3 Connection timed out
when talking to: https://<snip>/blah.json
@benibela
Copy link
Owner

It is documented in --help

But looks like it has been broken for 2 years

benibela added a commit that referenced this issue Jun 27, 2023
@DaVyper
Copy link
Author

DaVyper commented Jun 27, 2023

Thanks for looking into it, when/where can I get a compiled windows binary? (not a programmer in this language) I assume it'll eventually be on SF?

@Reino17
Copy link

Reino17 commented Jun 28, 2023

Eventually. But for now you could grab the latest nightly. I can see they're made just shortly after the latest commit, so they're probably up-to-date.

Benito, it would've been nice to see the creation-date on the nightly website, instead of having to download one to check.

@DaVyper
Copy link
Author

DaVyper commented Jun 29, 2023

must not be there yet as even implicitly using '--error-handling="-3"=retry' and '--error-handling="504"=retry' it still eventually times out and exits the process as it did before

@Reino17
Copy link

Reino17 commented Jun 29, 2023

xidel --help
[...]
  --error-handling=<string>             How to handle http errors, e.g.
                                        1xx=retry,200=accept,3xx=redirect,4xx=abort,5xx=skip

So xidel -s --error-handling=504=retry "<url>" -e "..." should work. Or even --error-handling="504=retry".

@benibela
Copy link
Owner

Perhaps there is another issue

Try it with the example domain:

 $  xidel http://example.org/xyz -e //title
 Error:
 Internet/HTTP Error: 404 Not Found
 when talking to: http://example.org/xyz
 $  xidel --error-handling 404=accept http://example.org/xyz -e //title
 Example Domain
 $  xidel --error-handling xxx=accept http://example.org/xyz -e //title
 Example Domain
 $  xidel --error-handling xx=accept http://example.org/xyz -e //title
 Error:
 Internet/HTTP Error: 404 Not Found
 when talking to: http://example.org/xyz
 $  xidel --error-handling 404=retry http://example.org/xyz -e //title

(last one never finishes, since it waits for the 404 error to go away, which is not happening)

using '--error-handling="-3"=retry' and '--error-handling="504"=retry'

you can only use it once

Benito, it would've been nice to see the creation-date on the nightly website, instead of having to download one to check.

It is not my website. You can ask here about it : https://github.com/oprypin/nightly.link/issues

@DaVyper
Copy link
Author

DaVyper commented Jun 29, 2023

you can only use it once

so i'm screwed if it has more than one error i.e. i can get past for ex the -3 but then if it gets a 504 it will fail since i can't tell it to retry on both

@benibela
Copy link
Owner

then you use both in one

--error-handling xx=retry,504=retry

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

3 participants