How to emulate mobile devices for bots

Providermor

Newbie
Joined
Feb 23, 2016
Messages
10
Reaction score
0
I am currently looking into Spotify botting and read relatively often, that it is important to simulate real user behaviour. How to automate a task using selenium is clear to me.

Now my question: How does one emulate mobile devices, especially ios devices to install the spotify app and automate it? I mean there is bluestacks and so on for android but how does this work for ios devices?

Isn't is suspicious if spotify sees that all my streams are from android devices or web players...
 
Web players and android players are fine to use. One source of user agent that is new and works great to avoid suspicion is using Google devices; Home, Hub etc.. But from my experience you can implement mobile user agents but the majority do come from Android devices and no issues.
 
do you think to worth it to setup the system for spotify?
they sell hundreds of play for cheap
 
Hello, there fellow programmer,
Automating mobile-devices (especially the iOS ones) using the usual methods is a very hard & daunting task. Due to the nature of the iOS operating system, unless you have access to an unsigned development version of the app or run on a jailbroken device (both are easily detected), you're not going to find much luck in the process.
But there are some unusual more blackhat & in most of the cases extremely harder methods for that specified devices, generally if you want to do it. You must sacrifice a couple of devices by experimenting with the Spotify application itself, then reverse engineer their API endpoints (including the advanced logging mechanism that almost every high-quality platform has) and write an API wrapper based on the information you gather during this phase.
Finally don't forget these APIs always get updated, but due to the nature of these systems, the updates won't be break changing, but there are adjustments to be made with every release of the target application.
And another final note about Spotify, they believe in defensive programming with their hearts, so expect lots of difficulties while reverse engineering their APIs.
Anyway, Keep up the good work and don't burn-out.
 
You can just add a user agent string to selenium.
Example

from selenium import webdriver
from selenium.webdriver.chrome.options import Options
opts = Options()
opts.add_argument("user-agent=whatever you want")

driver = webdriver.Chrome(chrome_options=opts)
 
Back
Top