LoginSignup
4
2

More than 5 years have passed since last update.

前澤自動化スクリプトを使ってみた

Posted at

元ネタはこちら

Macで失敗

  • seleniumで途中まで動いたがdriver errorで死んだ

Windows Python3系で失敗

  • pip install gimeiでcp932エラー
  • cmdの文字コードを変えてもダメ

Windows Python2系で成功

  • gimeiも入った
  • lxmlで検索しているところを微修正
    • .pathとtypoしている箇所を.xpathに (auth_codeの箇所)
    • 検索用の文字列を実際に合わせて変更 Sign up -> 登録する
  • 1周完了したのを確認したので、Windowsのタスクスケジューラでbatを定期実行

4回成功したのち、エラーが発生するようになる

  • 成功していたときと表示が変わるので、HTML内の検索もうまくいかずエラー

Twitterに表示された画面

twitter Options 
We've temporarily limited some of your account features

河原 果樹 
@xcA4T2mV5kBq5UT
What happened?

Your account appears to have exhibited unusual behavior violating the Twitter Rules. 
You can use all of Twitter's features again once you complete the following steps to confirm you are the account owner.

What next?
For full access, you must:
Pass a Google reCAPTCHA challenge
When you tap 'Start', Google may collect and use information about you, 
your device, and browser. View Google's Privacy Policy.
  • reCAPTCHAやって人間であることを示せとのこと
  • 面倒そうなのでここで止める

プロキシー設定はしているはずだが・・・

#proxy_server='http://159.89.200.187:8080'
proxy_server='http://139.59.80.140:8000'
options.add_argument('--proxy-server=%s' % proxy_server)

学び

  • 今までソシャゲのBotとか作ってこなかったが、今回のでselenium, lxml等に少し慣れた
4
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
4
2