DOM初心者 2019-10-16 09:48 采纳率: 0%
浏览 508

TypeError: 'unicode' object is not callable 错误 python2.7

刚学python 写的def的线程都不可用,于是模仿别人单线程直接插多线程,就出现以下错误,写的爬虫,线程是出来了,但是就是不能调用unicode,求大神解答

# -*- coding: utf-8 -*

import sys
reload(sys)
sys.setdefaultencoding('utf8')

import requests
import re
import time
import threading
import sys
import Queue as queue
import sys
import datetime

live = open('未爬.txt','w')
die = open('已爬.txt','w')
input_queue = queue.Queue()



list = raw__input("--> Enter Lists : ")
thread = input(" -> Thread : ")
link = “************”
head = {'User-agent':'Mozilla/5.0 (Linux; U; Android 4.4.2; en-US; HM NOTE 1W Build/KOT49H) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 UCBrowser/11.0.5.850 U3/0.8.0 Mobile Safari/534.30'}
s = requests.session()
g = s.get(link, headers=head)
list = open(list, 'r')_

print('')
print("-"*50)
print("-"*50)


while True:

        网页导入 = list.readline().replace('\n','')
        if not www:
            continue
        bacot = email.strip().split(':')
        xxx = {''************''}

        cek = s.post(link, headers=head, data=xxx).text
        if "************" in cek:
            print("|未爬|----->"+网页+"")
            live.write(网页+"\n")
        else: 
            print("|已爬 | -----> "+网页+" ")
            die.write(网页+"\n")

        for x in range(int(thread)):
            t = threading.Thread(target=cek)
            t.setDaemon(True)
            t.start()


print('')
print('-------------------------------------------------')
print('')_

  • 写回答

0条回答

    报告相同问题?

    悬赏问题

    • ¥15 素材场景中光线烘焙后灯光失效
    • ¥15 请教一下各位,为什么我这个没有实现模拟点击
    • ¥15 执行 virtuoso 命令后,界面没有,cadence 启动不起来
    • ¥50 comfyui下连接animatediff节点生成视频质量非常差的原因
    • ¥20 有关区间dp的问题求解
    • ¥15 多电路系统共用电源的串扰问题
    • ¥15 slam rangenet++配置
    • ¥15 有没有研究水声通信方面的帮我改俩matlab代码
    • ¥15 ubuntu子系统密码忘记
    • ¥15 保护模式-系统加载-段寄存器