Skip to content

Instantly share code, notes, and snippets.

@songthamtung
Last active August 11, 2019 12:37
Show Gist options
  • Save songthamtung/172c13f87cdacdbfe2270c011cb13622 to your computer and use it in GitHub Desktop.
Save songthamtung/172c13f87cdacdbfe2270c011cb13622 to your computer and use it in GitHub Desktop.
import requests
from bs4 import BeautifulSoup
result = requests.get("https://www.webscraper.io/test-sites/e-commerce/allinone")
soup = BeautifulSoup(result.content)
links = soup.find_all("a", "title")
data = {}
for link in links:
title = link.string
data[title] = link.attrs['href']
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment