国产av日韩一区二区三区精品,成人性爱视频在线观看,国产,欧美,日韩,一区,www.成色av久久成人,2222eeee成人天堂

網(wǎng)頁爬蟲 - python3 錯誤“No connection adapters were found for”
阿神
阿神 2017-04-18 09:49:39
0
1
4493

python3 版本
檢查連接的時候,出現(xiàn)錯誤“requests.exceptions.InvalidSchema: No connection adapters were found for '?http://oil.cngold.com.cn/2016...'”實(shí)在是不知道啥原因?很是奇怪
代碼如下:


import requests
from bs4 import BeautifulSoup

filepath = 'E:/links.txt'
with open(filepath,'rb') as f:
    links = f.readlines()

for link in links:
    link = link.strip().decode()
    print(link)
    html = requests.get(link)
    soup = BeautifulSoup(html.text)
    print(soup.title.get_text())

報錯信息如下:

阿神
阿神

閉關(guān)修行中......

reply all(1)
Ty80

This works,
Reference for this kind of questions
Requests: No connection adapters were found for, error in Python3

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template