W
W
WeilBrain2021-06-17 21:44:52
Python
WeilBrain, 2021-06-17 21:44:52

Proxy parser, the last line is displayed (although there are 400 of them), I don’t know what the problem is?

Hello! I ran into a problem, I have an https proxy, there are 400 of them, and only the last line is always issued.

with open('https.txt', 'r') as proxy:
    linesstrok = proxy.readlines()
    for proxy in linesstrok:
        ip= proxy.split(':')[0]
        port = proxy.split(':')[1]

    proxy= 'http://'+ ip + ":" + port
    print(proxy)

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Ronald McDonald, 2021-06-17
@WeilBrain

"Parser", lol.
Throw the last two lines at the end of the loop.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question