Httpx returns short result in python #1684
Unanswered
HackerEunji
asked this question in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello everyone. Now I'm using httpx in python but t he commands I used are as follows.
I want to collect possible domains into a txt file and make sure it works properly on httpx. Other than that command, I'm running several commands together through os.system, but httpx is the only problem. Running a Python file returns ridiculously short results compared to running httpx commands in the terminal window. The all_contents.txt file contains multiple domains.
In the python code
only 2 result returns.
But,
In the terminal
The results are much longer. Over 30 domains emerge.
If httpx doesn't work at all, I definitely think I misused the code. But in this case, the problem is that httpx works well, but the execution results don't work for long.My guess is, "There is a difference in the output of the results between the terminal and the execution of the Python code." When I run the Python code, it seems that something interferes with the output, or I don't get all the results executed in the window. But I don't know the exact reason.
What I tried was:
1) Change os.system to subprocess Popen command
This returns short results, as is the case with os.system, and when I output an error, the command returns 0 that means operating normally.
2) Change os.system to subprocess check_output command
It runs httpx, but it doesn't even return any results.
3) Adjusting options for httpx
I thought maybe concurrent requests were a problem, so I adjusted the thread as well. This is also useless.
4) Adding Environmental Variables
In this case, I've tried to go this far, but I haven't found the correct command yet.
5) Execute the command in new terminal
I even thought it was a Python problem, so I even opened a new external terminal called xterm and ran the command. But the same problem happens here! Because of this, I definitely think it's a problem with httpx. Reinstall httpx didn't also help.
Additional Error Occured ########################################
While receiving short results as described above, the above error occurred anew. Is this a problem with the network?
I've tried numerous ways, but I haven't solved them. I need your help
Beta Was this translation helpful? Give feedback.
All reactions