为纸小墨一键创建md文件
用法: 1 2 python the.py file_name [article_title] [author_id] # []括起来为可选项 ...
用法: 1 2 python the.py file_name [article_title] [author_id] # []括起来为可选项 ...
有时候感觉项目push上去每次都敲那么几个命令挺烦人的,可以用这个脚本来代替手工 ...
源自一个朋友的要求,他的要求是只爆破一个ip,结果出来后就停止,如果是爆破多个,完全没必要停止,等他跑完就好 ...
湖北定制版协议拨号 本来之前我e信账号被加小黑屋就没弄了,没想到又被放出小黑屋了,可以上了 据说1月份换协议,且用且珍惜,另外感谢陈大的项目 ...
代码 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 def parseBaidu(keyword, pagenum): keywordsBaseURL = 'https://www.baidu.com/s?wd=' + str(quote(keyword)) + '&oq=' + str(quote(keyword)) + '&ie=utf-8' + '&pn=' pnum = 0 while pnum <= int(pagenum): baseURL = keywordsBaseURL + str(pnum*10) try: request = requests.get(baseURL, headers=headers) soup = BeautifulSoup(request.text, "html.parser") for a in soup.select('div.c-container > h3 > a'): url = requests.get(a['href'], headers=headers).url yield url except: yield None finally: pnum += 1 ...