したがって、次のように、特定の画像へのリンクを取得しようとしていたとしましょう。
from bs4 import BeautfiulSoup
import urlparse
soup = BeautifulSoup("http://examplesite.com")
for image in soup.findAll("img"):
srcd = urlparse.urlparse(src)
path = srcd.path # gets the path
fn = os.path.basename(path) # gets filename
# lets say the webpage i was scraping had their images like this:
# <img src="../..someimage.jpg" />
それから完全なURLを取得する簡単な方法はありますか?または、正規表現を使用する必要がありますか?