Error when I want to combine URLs in Python scraping ModuleNotFoundError: No module named'urlparse'
I can't find the urlparse module (** import ** is not created)
sample.ry
from urllib.parse import urlparse
from urllib.parse import urljoin
# ModuleNotFoundError: No module named 'urlparse
sample.ry
try:
import urlparse
except ImportError:
import urllib.parse as urlparse
# OK
reference https://www.it-swarm.dev/ja/python/python%E3%83%A2%E3%82%B8%E3%83%A5%E3%83%BC%E3%83%ABurlparse%E3%82%92%E3%82%A4%E3%83%B3%E3%82%B9%E3%83%88%E3%83%BC%E3%83%AB%E3%81%A7%E3%81%8D%E3%81%BE%E3%81%9B%E3%82%93/961197002/ https://qiita.com/__xxx/items/577b494e1725e5173be5 https://github.com/heroku/kafka-helper/issues/6 https://qiita.com/Go-zen-chu/items/d7e6b9af0bd90c7aabca
Recommended Posts