♫musicjinni

Automate Instagram with Python/Selenium | Setup chromedriver with emulation PART 2

video thumbnail
Welcome to the Automate Social Medias using python and selenium series. In this series we are going to learn how you can automate your daily social media tasks and we will build an Instagram bot that comments automatically on posts based to the different hashtags we want. The bot will scrape only most recent posts from any hashtag and send comments in each of them. Bot will have the account rotation feature so it will change accounts every 6 comment.

This is part 2 of series where we will setup the chromedriver with emulation mode so we can get mobile version of the browser. We will also go to a simple site just to test.

==============LINKS==============
⚫Chromedriver emulator website:https://chromedriver.chromium.org/mobile-emulation

⚫Code for mobile emulation:

mobile_emulation = {
"userAgent": "Mozilla/5.0 (Linux; Android 4.2.1; en-us; Nexus 5 Build/JOP40D) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/90.0.1025.166 Mobile Safari/535.19"}
options.add_experimental_option("mobileEmulation", mobile_emulation)

=================================

Let's connect on other platforms👇
🔵Join Telegram Channel: https://t.me/topnotchprogrammer
🟣Instagram: https://www.instagram.com/redian_/
🔵Twitter: https://twitter.com/redian_marku

#selenium #python #webdriver
Disclaimer DMCA