gpt4 book ai didi

python - 当我使用 import urlparse 时,没有名为 'urlparse' 的模块

转载 作者:行者123 更新时间:2023-12-04 08:15:06 26 4
gpt4 key购买 nike

我无法运行此代码,有人可以帮助我吗?

import sys, urllib, re, urlparse
from urllib import urlretrieve
from BeautifulSoup import BeautifulSoup
它说是 ModuleNotFoundError: No module named 'urlparse'

最佳答案

对于 python3 使用以下

from urllib.parse import urlparse

关于python - 当我使用 import urlparse 时,没有名为 'urlparse' 的模块,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/65746528/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com