Skip to content

一亩三分地自动签到脚本 / 1point3acres auto sign script: Python + Selenium + raspberry pi 4

Notifications You must be signed in to change notification settings

minweny/1p3a_auto_sign

Repository files navigation

1p3a_auto_sign / 一亩三分地自动签到脚本

1point3acres.com forum auto sign script

Issue / To do:

Cannot bypass this verification code, working on it right now.

You don't get any points, but nor do you lose any points since it will log in for you everyday.

This script is still helpful, maintaining your current points!

What you need:

  • Python3
  • Chrome && chromedriver
  • Selenium
  • Linux (Use raspberry pi 4 for demo)

What it can do for you:

  • Auto sign for you to get one forum point every day
  • Send the account summary to your email, give you an idea of how many points you have in total:dog:
  • Save the screenshot of the forum news for you. (totally useless but I still did it)
  • Keep the logging information in example.log under the same folder. If there is errors or exceptions, you can check it here

Steps:

  1. Install Python3 (3.7+) to your Linux
  2. Install selenium, fake_useragent
pip3 install selenium
pip3 install fake_useragent
  1. Install chrome and chromedriver

Double click the deb file.The chromedriver would be registered in environment variable.

sudo dpkg -i packagename to have chromedriver installed into /usr/bin

does produce error messages BUT chromedriver install succeeds! 4. Download the project

git clone https://github.com/minweny/1p3a_auto_sign.git
cd 1p3a_auto_sign/

Your folder starts with one python file
start
5. In the same folder, create accounts.json
Fill in your 1point3acres.com account and password.
You can have multiple accounts, separated by comma.

[
	{
		"account": "",
		"password": ""
	}
]
  1. In the same folder, create email.json
    Fill in your account and password for Gmail, and the email address that you want to receive the notification.
    Note: You may need to disable some security settings in Gmail
{
	"senderGmailAccount": "***@gmail.com",
	"senderGmailPass": "",
	"receiver": "***@***.com"
}

After step 5 and 6, you would have:
accounts
7. Open your linux terminal, run the python script.

python3 1p3a.py

Test If you can receive the email about your forum points.
email
8. Add "python3 1p3a.py" to your crontab. Make it run once a day or more.
Open bash terminal

crontab -e

Add following setences

# execute the python script every day at spefic time
0 8,12,16,20 * * * cd /home/pi/1p3a_auto_sign/ && /usr/bin/python3 1p3a.py
  1. Modify 1p3a.py. Then you won't receive too many test emails.
change the first line from
testMode = True
to
testMode = False
  1. give py file permission, or the crontab won't work(doesn't matter?)
chmod 777 1p3a.py
  1. If you don't receive emails and find errors in example.log Error: The process started from chrome location /usr/bin/chromium-browser is no longer running change to headless mode
uncomment 44th line
change it from
# options.add_argument('--headless')
to
options.add_argument('--headless')

Logging and screenshot

You would find example.log and image.png under your current folder
res
Logging file / example.log
logging
Screenshot / image.png
screenshot

About

一亩三分地自动签到脚本 / 1point3acres auto sign script: Python + Selenium + raspberry pi 4

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages