Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8467517
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T15:40:10+00:00 2026-06-10T15:40:10+00:00

see this code PROXY_HOST, PROXY_PORT = choice(proxies).rstrip().split(:) fp = webdriver.FirefoxProfile() # Direct = 0,

  • 0

see this code

PROXY_HOST, PROXY_PORT = choice(proxies).rstrip().split(":")

fp = webdriver.FirefoxProfile()

# Direct = 0, Manual = 1, PAC = 2, AUTODETECT = 4, SYSTEM = 5
fp.set_preference("network.proxy.type", 1)

fp.set_preference("network.proxy.http", PROXY_HOST)
fp.set_preference("network.proxy.http_port", PROXY_PORT)
fp.set_preference("network.proxy.ftp", PROXY_HOST)
fp.set_preference("network.proxy.ftp_port", PROXY_PORT)
fp.set_preference("network.proxy.ssl", PROXY_HOST)
fp.set_preference("network.proxy.ssl_port", PROXY_PORT)

proxies is a list of proxies in form 123.123.123.123:1234\n. The weird thing is, if i hardcode the two variables PROXY_HOST and PROXY_PORT it will use a proxy, if i try to read it from a file which i do like this

with open("proxies.txt") as f:
    proxies = f.readlines()

the proxy settings are ignored. If i print the two vars, they are correct but not used.

So is there something I don’t see, how is it different to hardcode the ip and port or to read it from a file/list.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T15:40:12+00:00Added an answer on June 10, 2026 at 3:40 pm

    This is a how-do-I-properly-debug-issue. Look exactly at proxies in case this list is hardcoded vs. proxies in case you read it from file. Best would be to print both varialbes using repr(). You’ll see a difference. The solution will be very simple: after reading the port from a file, it still is a string and needs to be converted to an integer. When you hardcode it, you define it as an integer in the first place.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

See this code: TicketStoreService fakeTicketStoreService = MockRepository.GenerateMock<TicketStoreService>(); fakeTicketStoreService.Expect(service => service.DoSomething(Arg.Is(new Guid())) .Return(new Guid()); fakeTicketStoreService.DoSomething(Arg.Is(new
See this code: var jsonString = '{id:714341252076979033,type:FUZZY}'; var jsonParsed = JSON.parse(jsonString); console.log(jsonString, jsonParsed); When
So here's what I see this code doing: An array is made A loop
i'm playing with MEF and in the example i see this code ( i
In facebook tutorials I see this sample code: @Override public void onActivityResult(int requestCode, int
Please see this piece of code: #include<stdio.h> #include<string.h> #include<stdlib.h> int main() { int i
This code I am looking at has a lot of places where I see
I have this code below. As you can see I am passing two variables
it's common to see something like this in code, hopefully only during development: //XXX:
I can't see a clear mistake in this code. Instead of validating my fields,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.