查找某人在某微博裏留下的所有留言

查找某人在某微博裏留下的所有留言

#coding=utf-8

__author__ = 'user'

import requests

import sys

import re

import time

def getcomment(url,cook,commentid):

urlre=requests.get(url,cookies=cook)

html=urlre.text

cook2=urlre.cookies

print(html.encode('utf-8'))

print('')

mystate2=re.findall('

for i in range(1,76+1):

print('start%d'%i)

url='http://weibo.cn/u/111111?page=%d'%i

commentid='111111'

getcomment(url,cook,commentid)

#coding=utf-8

__author__ = 'user'

import requests

import sys

import re

import time

#

def readtxt():

k=0

ff=open('1.txt','r')

a=ff.readline()

while a:

k=k+1

print(k)

if k>=1:

print(a)

test(a,a)

a=ff.readline()

ff.close()

def test(url0,url):

cook={"Cookie":""}

urlre=requests.get(url,cookies=cook)

html=urlre.text

print('read')

if re.search('comment',html,re.S):

zy=re.search('123456',html,re.S)

if zy:

f=open('2.txt','r')

text=f.read()

f.close()

f=open('2.txt','w+')

f.write(text)

f.write(url0+'\n')

f.close()

else:

nexturl=re.search('method="post">

相关推荐

金英权:享受面对世界强队;世俱杯目标是小组出线
旧社会资本家剥削工人的残酷手段
365bet官网欧洲

旧社会资本家剥削工人的残酷手段

📅 07-01 👁️ 5715
手机qq扫一扫在哪里,怎么用
监控sh365下载

手机qq扫一扫在哪里,怎么用

📅 07-01 👁️ 283
【玉髓百科】什么是红玉髓?买前必读!
365淘房APP官网下载

【玉髓百科】什么是红玉髓?买前必读!

📅 07-23 👁️ 2850
ROS(一)——ROS发展史 & ROS是什么(通信机制+开发工具+应用功能+生态系统)
哈尔滨地铁哈尔滨东站站附近有哪些网吧
监控sh365下载

哈尔滨地铁哈尔滨东站站附近有哪些网吧

📅 07-05 👁️ 2823
access数据库打开方式有几种?access数据库如何打开
监控sh365下载

access数据库打开方式有几种?access数据库如何打开

📅 07-26 👁️ 9437
降的多音字组词
365bet官网欧洲

降的多音字组词

📅 06-28 👁️ 7869
黑户有逾期哪里能借到钱啊急用?精选10个征信黑、大量逾期能借到钱的平台