亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

為什么說get_ip_content 沒有定義?

為什么說get_ip_content 沒有定義?

明月笑刀無情 2018-07-11 14:05:56
from get_ip import *  response=requests.get(url=url,headers=headers,cookies=self.cookies,proxies=get_ip_content()) get_ip 類是這樣的 #!/usr/bin env python3import requestsimport reimport randomdef get_ip_content():   response=requests.get('http://www.httpipqq.com/api.asp?sl=10&noinfo=true&ddbh=189483614300055720')   ip_list=re.findall('(\d+\.+\d+\.+\d+\.\d+:\d+)', response.text, re.S)   PROXIES = {         "http": "http://"+ip_list[random.randint(0,len(ip_list))],    "https": "http://"+ip_list[random.randint(0,len(ip_list))],     }  return PROXIES下面這樣寫報錯?Traceback (most recent call last):File "wechat_official_accounts.py", line 85, in <module>wechat_offical_account().get_offical_account()File "wechat_official_accounts.py", line 36, in get_offical_accountresponse=requests.get(url=url,headers=headers,cookies=self.cookies,proxies=get_ip_content())NameError: name 'get_ip_content' is not defined為啥說我get_ip_content
查看完整描述

2 回答

?
幕布斯6054654

TA貢獻1876條經驗 獲得超7個贊

這樣寫的確報錯

get_ip.get_ip_content()# 了解一下


查看完整回答
反對 回復 2018-07-15
?
慕田峪7331174

TA貢獻1828條經驗 獲得超13個贊

直接導入get_ip,用包名加函數名來調用。

import get_ipget_ip.get_ip_content()


查看完整回答
反對 回復 2018-07-15
  • 2 回答
  • 0 關注
  • 171 瀏覽

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號