Pass 403 forbidden error for instagram automation with python
Бюджет $10-30 USD
Job Description:
Hi,
I have a python code which makes automatic posts to instagram. For this code to work, I have to provide session id and csrf token.
Previously, I was using below code to get that. Now, I get 403 forbidden error. I tried many ways, including Node, Selenium, etc. but couldn't solve this problem. I am using a local proxifier by the way. I was also using a proxifier previously. I need someone who will help me to pass this problem.
def main_get_csrf_token():
link = '[login to view URL]'
login_url = '[login to view URL]'
time = int([login to view URL]().timestamp())
payload = {
'username': INSTAGRAM_USERNAME,
'enc_password': f'#PWD_INSTAGRAM_BROWSER:0:{time}:{INSTAGRAM_PASSWORD}',
'queryParams': {},
'force': 'False',
'optIntoOneTap': 'False',
'two_step_verificator': 'True',
}
login_header = {
"User-Agent": "Chrome/77.0.3865.120",
#"User-Agent": "Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.120 Safari/537.36",
"X-Requested-With": "XMLHttpRequest",
"Referer": "[login to view URL]",
#"x-csrftoken": csrf
}
login_response = [login to view URL](login_url, data=payload, headers=login_header)
json_data = [login to view URL]([login to view URL])
if json_data["authenticated"]:
print("login successful")
cookies = [login to view URL]
cookie_jar = cookies.get_dict()
csrf_token = cookie_jar['csrftoken']
print("csrf_token: ", csrf_token)
session_id = cookie_jar['sessionid']
print("session_id: ", session_id)
else:
print("login failed ", [login to view URL])
8 фрилансеров(-а) готовы выполнить эту работу в среднем за $20
Hello, Greetings Ferda S., Good afternoon! I am an expert web developer with skills including Linux, Web Scraping, Software Architecture, Python and PHP. "login failed " Please contact me to discuss more regarding Больше
Greetings, I have gone through your project description. I find myself as a perfect fit for this job. I am working as a Python Developer from last 2 year. Some of my expertise is in the fields: 1. Web Scraping/Web Au Больше
⭐⭐⭐I can start now and I am confident that I can do it ⭐⭐⭐ I have 10 years of experience in this field and I have these skills (PHP, Linux, Web Scraping, Software Architectureand Python) so just check my reviews and pl Больше
I will fix error. I have all skills required for the task. Please let me know when I can start. Regards, Anoop
I have 5+ years experience in python programming language and 3+ years experience in django, I have been mentoring cyber security in Uzbekistan for 3+ years I think I can make you work