Skip to content

Instantly share code, notes, and snippets.

@DIYer22
Created June 25, 2018 18:09
Show Gist options
  • Save DIYer22/3174ae908de0579d11f0779e402bffc8 to your computer and use it in GitHub Desktop.
Save DIYer22/3174ae908de0579d11f0779e402bffc8 to your computer and use it in GitHub Desktop.
Download all DIYer22's weekly review and save to one markdown file
# -*- coding: utf-8 -*-
"""
Download all DIYer22's weekly review and save to one markdown file
Created on Mon Jun 25 20:41:22 2018
@author: Lei Yang
"""
from boxx import *
from bs4 import BeautifulSoup
bs = BeautifulSoup
import webbrowser as wb
import requests
rq = requests
import json
home = 'https://api.github.com/repos/BUCT-Vision/weekly-review/issues?creator=DIYer22'
#rs = openread('issues.json')
rs = rq.get(home).text
wrs = json.loads(rs)
md = '\n\n----\n\n'.join([ '# %s\n\n%s'%(wr['title'], wr['body']) for wr in wrs ])
openwrite(md, 'weeklyReports.md')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment