import bs4 as BeautifulSoup
import requests
adhive = "https://icobench.com/ico/adhive"
savedroid = "https://icobench.com/ico/savedroid"
cmc = "https://coinmarketcap.com/currencies/bitcoin/"  

r = requests.get(url)
if r.status = 'ok'
    page = r.content

def scrape(url):
    r = requests.get(url)
    if r.status = 'ok':
        page = r.content
        return page 

page = scrape(adhive)

soup = BeautifulSoup(page,"lxml")

Project = soup.find("title").text.split('(')[0].rstrip()
Ticker = soup.find("title").text.split('(')[1].split('(')
Description = soup.find('meta')['content']
OpenDate = soup.find('div',{'class':'number'}).find('small').text.split('-')[0].rstrip()
CloseDate_Planned = soup.find('div',{'class':'number'}).find('small').text.split('-')[1].lstrip()
PricePerCoin = soup.find("variable")

Price = ("price")['data-usd']

I learned to first look at the website and explore the DOM to see the structure of the website.

Share this project:

Updates