上一页 1 ··· 92 93 94 95 96 97 98 99 100 ··· 125 下一页
摘要: 表情是获取alt属性的值 传入内容的div区域即可,node就是内容的最外层的节点 阅读全文
posted @ 2018-03-28 15:45 公众号python学习开发 阅读(331) 评论(0) 推荐(0)
摘要: 使用sqlchemy查询出一个集合的时候第一个对象可以使用,后面的就报如下错误。 sqlalchemy.orm.exc.DetachedInstanceError: Instance <LoginInfo at 0x6d79e70> is not bound to a Session; attrib 阅读全文
posted @ 2018-03-27 09:54 公众号python学习开发 阅读(2129) 评论(0) 推荐(0)
摘要: from socket import *#利用socket模块生成套接字s = socket(AF_INET,SOCK_DGRAM)#定义一个元组,包含ip地址,和端口号,ip地址必须为字符串,端口号为#数字 飞秋的默认端口为2425add = ("192.168.100.148",2425) #设 阅读全文
posted @ 2018-03-27 09:01 公众号python学习开发 阅读(340) 评论(0) 推荐(0)
摘要: 在看 Bottle 代码中看见 functools.wraps 这种用法。 def make_default_app_wrapper(name): """ Return a callable that relays calls to the current default app. """ a = 阅读全文
posted @ 2018-03-26 10:22 公众号python学习开发 阅读(524) 评论(0) 推荐(0)
摘要: 1.namedtuple 定义一个可以使用属性获取数据的tuple。 2.deque deque是为了高效实现插入和删除操作的双向列表,基本方法类似list,下面是简单的几个方法尝试。 阅读全文
posted @ 2018-03-26 10:01 公众号python学习开发 阅读(164) 评论(0) 推荐(0)
摘要: 1.用手机号注册推特账号 https://twitter.com/ 2.进入网站 https://apps.twitter.com/ 创建第一个app,填入基本信息 name写完会检测是否已经存在像我下面这个就存在了 所以第二张图改完之后的名字。 重点Website *的填写 ,需要填写的url是需 阅读全文
posted @ 2018-03-23 21:11 公众号python学习开发 阅读(6426) 评论(0) 推荐(0)
摘要: if 后面跟的是条件表达式,条件表达式的结果为True或者False。 (1)如果if后面的条件是数字,只要这个数字不是0,python都会把它当做True处理,见下面的例子: if 3: print 'OK' 输出OK,但是如果数字是0,就会被认为是False。 (2)如果if后面跟的是字符串,则只要这个字符串不为空串,python就把它看作True,参见下例 if 'hehe':... 阅读全文
posted @ 2018-03-23 15:15 公众号python学习开发 阅读(968) 评论(0) 推荐(0)
摘要: 输出字典key 给你一字典a,如a={1:1,2:2,3:3},输出字典a的key,以','连接,如‘1,2,3'。要求key按照字典序升序排列(注意key可能是字符串)。 例如:a={1:1,2:2,3:3}, 则输出:1,2,3 方案1: 方案2: 输出100以内的所有素数,素数之间以一个空格区 阅读全文
posted @ 2018-03-23 12:55 公众号python学习开发 阅读(415) 评论(0) 推荐(0)
摘要: 带转换字符串Thu Mar 22 05:33:41 +0000 2018,格式化字符串"%a %b %d %H:%M:%S +0000 %Y" 阅读全文
posted @ 2018-03-22 15:00 公众号python学习开发 阅读(249) 评论(0) 推荐(0)
摘要: # -*- coding: utf-8 -*- from tweepy import OAuthHandler import datetime import pandas as pd import tweepy import time import random import traceback from dbs.db import * class Twitter_Spider(): ... 阅读全文
posted @ 2018-03-22 14:50 公众号python学习开发 阅读(2482) 评论(0) 推荐(0)
上一页 1 ··· 92 93 94 95 96 97 98 99 100 ··· 125 下一页