Block fish is a game based on block chain. This game currently has an invitation activity, inviting friends to register and sending corresponding kinds of fish. Different fish prices are different

  • 0.015 ETH for normal fish (invite 3 friends)

  • Rare fish 0.05 ETH (invite 15 friends)

  • Epic Fish from 0.35 ETH (invite 100 friends)

  • Legend Fish 1.5 ETH (invite 1000 friends)

Best of all, the site is registered with an email address and doesn’t block temporary email services, so we have ha-ha-ha-ha.

Tools to prepare

  • A temporary mail service: YOPmail is what I use here

  • Python

  • chrome webdriver

  • selenium

  • Iterm2 (installing imgCat tool): The verification code is to be entered, so iterm2 is used to output the verification code image to the terminal.

steps

Get your own invite link

Go to block Fish’s website, sign up for an account, and get your own invite link.

Get a temporary mailbox

  • Open the YOPmail website and get an email address, as shown belowNotice in the first image, there is a view mailbox button, enter a temporary mailbox, click this button, you can see the messages received by this temporary mailbox, this is useful for getting active connections. The code of the whole process is as follows:

    Mock Invite registration

    • In the previous step, we got the temporary mailbox

    • Open your invitation link, then click Login -> Register, and fill in the registration information as shown below


    • The following code

      • Because of the captchas problem, and the simple captchas recognition library will not be able to recognize, so this place is not going to spend too much time directly to print captchas to the terminal, manual input

        • Fill in the data and click the register button

          Email activation

          • After successful registration, our temporary mailbox will receive an email for registration activation. Open the mailbox page in the first step, enter the mailbox, and click the check button to open the mailbox.

            • When I open the mailbox page, I find that the contents of the mailbox are presented in the form of iframe, so I need to deal with this:

              • If you open the mailbox too many times, YOPmail will generate a machine recognition check, so there is a try catch statement in the code to determine whether the machine detection has been encountered. If so, you need to click on the check and continue to run the code.

              • Once you get the registration link, just turn on activation.

              Results show

              conclusion

              • This script simply uses Python’s Selenium library to simulate the user registration process to invite users.

              • This script also leaves a lot to be desired, such as captcha recognition, robot detection, and some false judgments.

              • This script is just for communication and learning.

              The related resources

              • Detailed code address: github.com/xiaochao/Ca…






              This article is excerpted from asynchronous community by Xiaochao and titled “Write a script to collect fish wool”. Click below to read the original article and see more.

            • Stretch recommended



    Click on keywords to read more new books:

    Python | | machine learning Kotlin Java | | | | mobile development robots contests | Web front-end | book list

    If you reply “follow” in the background of “Asynchronous books”, you can get 2000 online video courses for free. Recommend friends to pay attention to according to the prompts to get a gift book link, free of charge asynchronous books. Come and join us!

    Read the original article to find out more about the book

    Scan the qr code above and reply “follow” to participate in the event!