Search

sametbh
sametbh
  • Tags
  • TFT

    Scrape HTML Tables

    Jun 16, 2020

    Easy script to scrape tables from a website from Stack Overflow .

    import requests
    import pandas as pd
    url = 'URL'
    html = requests.get(url).content
    df_list = pd.read_html(html)
    df = df_list[-1]
    print(df)
    
    scraping python

    Related

    • Parsing Frontmatter with Python
    • Web Scraping Resources
    • UTF-8 encoding errors in python scripts
    • Python Keep First Occurence Of Date
    • Opening and reading files in python

    cite
    copy download