Switch to English?
Yes
Переключитись на українську?
Так
Переключиться на русскую?
Да
Przełączyć się na polską?
Tak
Post your project for free and start receiving proposals from freelancers within minutes after publication!

Перевести java запит в python


  1. 8918
     54  2

    1 day11 USD

    Good morning, I’m glad to help you, I already have experience in this field.

    Andrei Wozniak

  2. 157    2  0
    1 day11 USD

    Hello to you,
    The code is ready, I will send you as soon as you write.
    I will be happy with personal messages.

  3. 423    15  0
    1 day11 USD

    If still relevant, ready to do right now through the library requests

  4. 23  
    1 day11 USD

    Good morning, the code is ready.
    Unfortunately, less than 500 UAH cannot be placed.

  5. 410    10  0
    1 day11 USD

    Good evening ! I am pleased to fulfill your task! I work 24/7

  6. 19  
    1 day11 USD

    Here is the translation of this code from Java to Python:

    Imported by urllib.parse
    Import Requests

    def auth (login and password)
    URL = "https://example_some_site.com/Bla/Bla/Bla/Login"
    data = {"Username": login, "Password": password, "Locale": "Ru"}
    This is the beginning code, I already have a ready code for you.


    This code does the same as the output code in Java. It accepts the login and password as arguments, forms the request using the requests library, sends it to the server and returns the cookie value. It is important to note that the urllib.parse module is used to code the URL and data forms.

  7. 7844    96  0
    1 day11 USD

    Hello, you are ready to do everything right now. Write it.
    Unfortunately I can’t put less than 500 :(

  8. 543    19  2
    1 day11 USD

    Good night, ready to help you. I wait for answers.
    Online 24/7

  9. 1 proposal concealed
  • Alex Boird H@B
    23 February 2023, 0:27 |
    import urllib.parse
    import requests
    
    
    
    def auth(login, password):
        data = urllib.parse.urlencode({
            "username": login,
            "password": password,
            "locale": "ru"
        }).encode('utf-8')
        headers = {
            "Content-Type": "application/x-www-form-urlencoded",
            "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/107.0.0.0 Safari/537.36"
        }
        response = requests.post("https://example/bla/bla/login", headers=headers, data=data)
        print(response.text)
        print(response.status_code)
    
        # set_cookie_header = response.headers.get("Set-Cookie")
        # cookie_value = Cookie().parse(set_cookie_header).get(0).value
        # return cookie_value
    
    auth(login,password)

    ось таке на пайтоні не працює = раптом хтось хотів так написати

    а на джава те що дав в завданні - працює

  • Vlad Petrovskyi
    23 February 2023, 0:29 |

    Доброго дня, код готовий
    Нажаль нижче 500 грн не можу поставити
    Можу відправити вам результат у приватні повідомлення для перевірки

  • Alex Boird H@B
    23 February 2023, 9:38 |

    задачу вирішено

    data = urllib.parse.urlencode({
            "username": login,
            "password": password,
            "locale": "ru"
        }).encode('utf-8')

    ось такий код, багато хто писав - він не правильний

    бо не правильно з джава на пайтон то переаодили,

    на джава чітко аписано що стрічку ми урл енкоде на джава робили, і не всього дікту, а логіну і пасворду тільки

    і на пайтону урленкоде не дікта робити, а саме для стрічки !!!

Current freelance projects in the category Java

Development of an Android application player for the online TV service

609 USD

We need an Android developer to create a native Android application for an online TV service. Two versions are planned: for mobile devices: smartphones and tablets; for Android TV / Android STB: set-top boxes. Estimated timeline: up to 3 months. Estimated budget: 150,000…

JavaApp Development for Android ∙ 24 days 19 hours back ∙ 31 proposals

Client
Alex Boird H@B
Ukraine Lvov  9  1
Project published
3 years back
177 views