Skip to content

Collect Tweets

Collect Tweets #1790

Workflow file for this run

name: Collect Tweets
on:
push:
branches:
- main
schedule:
- cron: "0 */4 * * *"
jobs:
update:
name: Collect Tweets
runs-on: ubuntu-latest
env:
COOKIE: ${{ secrets.COOKIE }}
steps:
- name: Checkout Repo
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.11
- name: Install dependencies
run: |
python -m pip install --upgrade pip setuptools wheel
pip install tenacity==8.3.0
pip install -U minet==1.3.2
- name: Scrape tweets
run: minet twitter scrape tweets 'from:medialab_ScPo' --limit 30 --cookie "${COOKIE}" > data/medialab_tweets.csv
- name: Check
run : ls data
- name: Commit enrichment
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
git add data
git pull
git commit -m "update data" data
git push