Skip to content

Instantly share code, notes, and snippets.

View zhu327's full-sized avatar
🥰
Out sick

Timmy zhu327

🥰
Out sick
View GitHub Profile
@zhu327
zhu327 / hugo-blog.py
Created April 18, 2016 13:00
从blog迁移到hugo脚本
# coding: utf-8
import MySQLdb
connect = MySQLdb.connect(user='root', passwd='', db='blog', host='127.0.0.1', port=3306)
cursor = connect.cursor()
cursor.execute('SELECT title, content, tags, created FROM blogs')
result = cursor.fetchall()
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import urllib2, cookielib, hashlib, urllib, json
EMAIL = ''
PWD = ''
URL = 'http://bozpy.sinaapp.com'
def post(filename):
@zhu327
zhu327 / player.py
Last active January 19, 2022 06:05
XBMC 迅雷云播: 直接通过下载地址推送迅雷云播地址到XBMC上
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import urllib, urllib2, json
RPC_URL = 'http://192.168.1.2/jsonrpc'
def pushStream(stream, rpc=RPC_URL):
'''
Push stream URL to XBMC jsonrpc api, XBMC play the streaming.