新博客地址 http://4ct10n.cn
近期会将新的文章发表到新博客上 ,如果有什么问题还请大家纠正
QQ:1792034533
Email:act01n@163.com
ps:贴上自己的导出csdn的代码成md格式
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Date : 2017-10-21 23:19:58
# @Author : 4ct10n (act01n@163.com)
# @Link : http://example.org
import requests
import sys
from bs4 import BeautifulSoup
def Get_all_page(url):
pages = []
lists = []
base_url = 'http://blog.youkuaiyun.com'
# get pages
res = requests.get(url)
soup = BeautifulSoup(res.content, 'html.parser', from_encoding='utf-8')
page = soup.find_all(id='papelist')[0].find_all('a')
num = page[len(page)-1]['href&#