A tool helps increase the probability to win Pinduoduo QA content.
├── cocurrent.py: modules to do search cocurrently
├── config.py: configuration file
├── helper.ipynb: some useful scripts while developing
├── history_query.csv: history questions and their options and type
├── img/: a folder to restore screenshots
├── main.ipynb: the main notebook you need to run
├── main.py: the main python file you need to run
├── parallel.py: methods to do search in perallel
├── README.md: specialization
├── requirements.txt: necessary dependencies
├── run_cocurrent.py: scripts you might run in python shell to use coroutines
├── run_parallel.py: scripts you might run in python shell to use multi-cores
└── screenshot.py
Install python, pip
sudo apt install python3-pip python3-dev
Install necessary dependencies
sudo pip install -r requirements.txt
adb is necessary to the connection between your Android phone and your computer.
sudo apt-get install android-tools-adb
-
Methods
- wordcount: compare the option occurences in search results.
sogou
wenwen
360
zhidao
toutiao
- pagecount: compare the co-occurences (question and 2 options in individual) in search (sogou search) results.
- browser: open default browser and do web search (baidu search so far) using question as the keyword.
- wordcount: compare the option occurences in search results.
-
IP Proxy
you might use proxies provider you like. The
QA.get_ips()
is defined based on 蘑菇 API. You might rewrite it and place your proper api to theConfig.IP_PROXY_API
. If you're going to use current and static proxies, you need to assign them to theConfig.IP_POOL
.
-
get into the QA content
-
main.ipynb, main.py, run_cocurrent.py, run_parallel.py
To run
main.ipynb
in jupyter notebook while you are participating is recommanded. When the game comes to a new question like:
run the cell in main.ipynb
, and it'll output the suggested answer.
If you want a better result, to paste the code in run_cocurrent.py
or run_parallel.py
(best effect, shown as below) to python terminal(python shell) is not a bad choice. This script will help search the answer in at least 4 web search engine and open default browser in the mean time.
🔲 History query match
🔲 Negative words detection. Probably see Negative Words Dictionary
🔲 GUI
- If you like this repo, 💓 please star🌟 it.
- If you have any problem, you may create an issue, and I'll check it out ASAP.