(Ultimate) goal: scrape user public data to gain insights and produce a profile.
Instagram automation: (daily cron) log in as my user, switch to 'activity' -> 'following', and collect the text feeds since 1 day ago, and store them in ./src/feeds/, in a structured format
- appium setup
- Android Studio, virtual device Nexus 5X API 28 x86
- Apk binary mirror: instagram
- pytest
- given
credentials/insta.jsoncontaining
{
"username": "xxx",
"password": "yyy"
}
- run
cd src; ./insta.pyto run automated test.
- appium takes a long time to connect inspector / run app: check environment variable proxy setting
- activity startup: to figure out
appWaitActivityandappWaitPackage, run this the window is active:
adb shell dumpsys window windows | grep -i activity
- Appium device inspector: use capabilities json to inspect instagram
- apk abi mismatch: emulator abi (x86, arm, etc) needs to match apk abi
INSTALL_FAILED_NO_MATCHING_ABIS: Failed to extract native libraries, res=-113