Scraping free proxy list and use SQLAlchemy to save it to database.
- Clone this repo with command:
git clone git@github.com:mosiahr/free_proxy.git
cd free_proxy/
- Create a virtual environment (either
pipenv
,virtualenv
orvenv
) - Install requirements (either with
pipenv
orpip install -r requirements.txt
) - Run the command to get help:
python3 main.py --help
Run command: python3 main.py --file csv
or with short option: python3 main.py -f csv
Run command: python3 main.py --database sqlite
or with short option python3 main.py -db sqlite
-
Before run program you need to set variables
SCHEMA_MYSQL, USER_MYSQL, PASS_MYSQL, HOST_MYSQL, DB_NAME_MYSQL
insettings.py
-
Run command:
python3 main.py --database mysql
or with short optionpython3 main.py -db mysql
You can get a proxy list just by writing:
scraper = FreeProxyScraper()
proxies = scraper.scraping()
That see logs use argument: --echo yes
For example:
python3 main.py -db sqlite --echo yes