Scrape and Push Proxies #20
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Scrape and Push Proxies | |
on: | |
schedule: | |
- cron: '0 */3 * * *' | |
push: | |
branches: | |
- main | |
permissions: | |
contents: write | |
jobs: | |
scrape_and_push_proxies: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Install Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.10' | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install -r requirements.txt | |
- name: Scrape proxies | |
run: | | |
python3 proxyScraper.py -p http -o proxies/http.txt | |
python3 proxyScraper.py -p https -o proxies/https.txt | |
python3 proxyScraper.py -p socks4 -o proxies/socks4.txt | |
python3 proxyScraper.py -p socks5 -o proxies/socks5.txt | |
- name: Check HTTP proxies | |
run: | | |
python3 proxyChecker.py -t 20 -s google.com -l proxies/http.txt -o proxies/http-tested/google.txt | |
python3 proxyChecker.py -t 20 -s facebook.com -l proxies/http.txt -o proxies/http-tested/facebook.txt | |
python3 proxyChecker.py -t 20 -s twitter.com -l proxies/http.txt -o proxies/http-tested/twitter.txt | |
- name: Check HTTPS proxies | |
run: | | |
python3 proxyChecker.py -t 20 -s google.com -l proxies/https.txt -o proxies/https-tested/google.txt | |
python3 proxyChecker.py -t 20 -s facebook.com -l proxies/https.txt -o proxies/https-tested/facebook.txt | |
python3 proxyChecker.py -t 20 -s twitter.com -l proxies/https.txt -o proxies/https-tested/twitter.txt | |
- name: Commit | |
run: | | |
git config --global user.email ${{ secrets.GIT_EMAIL }} | |
git config --local user.name ${{ secrets.GIT_NAME }} | |
git commit -am "feat: update proxies" | |
- name: Push changes | |
uses: ad-m/github-push-action@master | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
env: | |
CI: true |