Traceback (most recent call last):
File "exec.py", line 48, in <module>
main()
File "exec.py", line 42, in main
process = Popen(['python3.5', BASE_DIR + '/script.py', field_id, username, password, z4, z5, z6, z7, z8, z9, z10, agent])
File "/usr/lib/python3.5/subprocess.py", line 947, in __init__
restore_signals, start_new_session)
File "/usr/lib/python3.5/subprocess.py", line 1490, in _execute_child
restore_signals, start_new_session, preexec_fn)
TypeError: Can't convert 'int' object to str implicitly
(14, 'ffd', 'gfdg', '', '', '1', None, 0, 0, 0, 'Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.87 Safari/537.36', '20F17EB195')
14
ffd
gfdg
Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.87 Safari/537.36
"Mozilla/5.0 юзерагент
BASE_DIR = os.path.dirname(os.path.abspath(__file__))
with open(BASE_DIR + '/config.json') as json_file:
config_data = json.load(json_file)
database_config = config_data['database_config']
connection = pymysql.connect(
host=database_config['host'],
user=database_config['login'],
password=database_config['password'],
port=int(database_config['port']),
db=database_config['database'],
)
def main(field_id, user_email, user_password, z4, z5, z6, z7, z8, z9, z10, agent):
os.environ['DISPLAY'] = ':0.0'
display = Display(visible=0, size=(1280, 1500))
display.start()
options = webdriver.ChromeOptions()
options.add_argument("--user-agent='" + agent + "'")
print(agent + ' юзерагент')
я всего лишь пытаюсь передать субпроцессу юзерагента, но пока безуспешно