Skip to content

Instantly share code, notes, and snippets.

@LordH3lmchen
Created October 31, 2018 20:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save LordH3lmchen/79dc7a5aa7e6b7645a86962a126144d8 to your computer and use it in GitHub Desktop.
Save LordH3lmchen/79dc7a5aa7e6b7645a86962a126144d8 to your computer and use it in GitHub Desktop.
Download FM4 Charts and extract the titles
import pandas as pd
urls = [
'https://fm4.orf.at/stories/2887546/',
'https://fm4.orf.at/stories/2889230/',
'https://fm4.orf.at/stories/2890528/',
'https://fm4.orf.at/stories/2891999/',
'https://fm4.orf.at/stories/2893391/',
'https://fm4.orf.at/stories/2894720/',
'https://fm4.orf.at/stories/2895938/',
'https://fm4.orf.at/stories/2897359/',
'https://fm4.orf.at/stories/2898789/',
'https://fm4.orf.at/stories/2900226/',
'https://fm4.orf.at/stories/2901723/',
'https://fm4.orf.at/stories/2903046/',
'https://fm4.orf.at/stories/2904364/',
'https://fm4.orf.at/stories/2906956/',
'https://fm4.orf.at/stories/2908141/',
'https://fm4.orf.at/stories/2909724/',
'https://fm4.orf.at/stories/2910847/',
'https://fm4.orf.at/stories/2912352/',
'https://fm4.orf.at/stories/2913764/',
'https://fm4.orf.at/stories/2915021/',
'https://fm4.orf.at/stories/2916590/',
'https://fm4.orf.at/stories/2917976/',
'https://fm4.orf.at/stories/2919267/',
'https://fm4.orf.at/stories/2920527/',
'https://fm4.orf.at/stories/2921838/',
'https://fm4.orf.at/stories/2923267/',
'https://fm4.orf.at/stories/2924557/',
'https://fm4.orf.at/stories/2925830/',
'https://fm4.orf.at/stories/2926742/',
'https://fm4.orf.at/stories/2928359/',
'https://fm4.orf.at/stories/2929713/',
'https://fm4.orf.at/stories/2930806/',
'https://fm4.orf.at/stories/2932103/',
'https://fm4.orf.at/stories/2933400/',
'https://fm4.orf.at/stories/2934618/',
'https://fm4.orf.at/stories/2936082/',
'https://fm4.orf.at/stories/2937444/',
'https://fm4.orf.at/stories/2938710/',
'https://fm4.orf.at/stories/2940122/',
'https://fm4.orf.at/stories/2941461/',
'https://fm4.orf.at/stories/2942597/',
'https://fm4.orf.at/stories/2943984/',
]
charts = []
for url in urls:
charts.append(pd.read_html(url)[0])
all_charts = pd.DataFrame()
for chart in charts:
all_charts = all_charts.append(chart)
titles = all_charts.loc[:, 'Interpret':'Titel'].drop_duplicates()
titles.to_csv('unique_fm4_titles.csv')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment