Skip to content

Instantly share code, notes, and snippets.

View coldestlin's full-sized avatar
🚀

Gee coldestlin

🚀
  • Shenzhen
View GitHub Profile
@coldestlin
coldestlin / capture_articles.py
Created April 7, 2020 02:40 — forked from 2019ncovmemory/capture_articles.py
Create screenshots of articles; work for WeChat articles with lazy loading.
'''
Usage: python archive_articles.py test.csv
Input: test.csv
name url
1 url1
2 url2
.....
output:
1.png
2.png
# see also https://github.com/wrobstory/pgshift
import gzip
from io import StringIO, BytesIO
from functools import wraps
import boto
from sqlalchemy import MetaData
from pandas import DataFrame
from pandas.io.sql import SQLTable, pandasSQL_builder