Dnomd343
2 years ago
1 changed files with 18 additions and 0 deletions
@ -0,0 +1,18 @@ |
|||||
|
#!/usr/bin/env python3 |
||||
|
# -*- coding: utf-8 -*- |
||||
|
|
||||
|
""" |
||||
|
Download raw JSON content. |
||||
|
|
||||
|
USAGE: python3 fetch.py [OUTPUT_JSON] |
||||
|
""" |
||||
|
|
||||
|
import sys |
||||
|
sys.path.append('..') |
||||
|
from utils import logger |
||||
|
from utils import httpRequest |
||||
|
|
||||
|
logger.warning('Fetch html of `zhihu.com`') |
||||
|
jsonRaw = httpRequest('https://www.zhihu.com/api/v4/columns/c_1553471910075449344/items?limit=%d&offset=0' % 23) |
||||
|
with open(sys.argv[1], 'wb') as fileObj: |
||||
|
fileObj.write(jsonRaw) |
Loading…
Reference in new issue