I hereby claim:
-
I am geekgogo on github.
-
I am geekgogo (https://keybase.io/geekgogo) on keybase.
-
I have a public key ASCWLfBlwxiZGUNEbIkwebiAZMHlZemfq2UQoYJ6iteJ1go
# coding=utf-8 | |
import os | |
from moviepy.editor import VideoFileClip | |
import datetime | |
def get_filesize(filename): | |
u""" | |
获取文件大小(M: 兆) | |
""" |
# 切分列表l,使每个子列表的长度为12 | |
l = [i for i in range(50)] | |
result = [l[i:i+12] for i in range(0,len(l), 12)] |
<ul> | |
<li><a href="/m/news/1">首页</a></li> | |
<!-- 始终显示5个页面 --> | |
<!-- 页面数小于5个时 --> | |
{% if pages < 5 %} | |
{% for i in range(len(pages)) %} | |
<li><a href="/m/news/{{ i + 1 }}">{{ i + 1 }}</a></li> | |
{% endfor %} | |
<!-- 页面数大于5个时 --> | |
{% else %} |
package main | |
import ( | |
"flag" | |
"fmt" | |
"os" | |
"path/filepath" | |
) | |
func getFilelist(path string) { |
from PIL import Image, ImageDraw, ImageFont, ImageFilter | |
import random | |
try: | |
import cStringIO as StringIO | |
except ImportError: | |
from io import StringIO | |
from io import BytesIO | |
from PIL import Image | |
import requests | |
from io import BytesIO | |
def download(url, name): | |
ret = requests.get(url) | |
image = Image.open(BytesIO(ret.content)) | |
image.save(name) |
def download_video(url, path): | |
try: | |
headers = { | |
"User-Agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.122 Safari/537.36" | |
} | |
response = requ.get(url, headers=headers) | |
data = response.content | |
if data: | |
print("视频get") | |
# 写入收到的视频数据 |
I hereby claim:
I am geekgogo on github.
I am geekgogo (https://keybase.io/geekgogo) on keybase.
I have a public key ASCWLfBlwxiZGUNEbIkwebiAZMHlZemfq2UQoYJ6iteJ1go