diff options
-rw-r--r-- | unbiased/sources/bbc.py | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/unbiased/sources/bbc.py b/unbiased/sources/bbc.py index caceced..144c8f5 100644 --- a/unbiased/sources/bbc.py +++ b/unbiased/sources/bbc.py @@ -4,7 +4,7 @@ class BBC(NewsSource): name = 'BBC News' shortname = 'bbc' - url = 'http://www.bbc.com/news/world/us_and_canada' + url = 'https://www.bbc.com/news' bad_images = ['bbc_news_logo.png'] @@ -12,16 +12,17 @@ class BBC(NewsSource): def _fetch_urls(cls): soup = cls._fetch_content(cls.url) - h1s = soup.find('div', class_='buzzard-item')\ - .find('a', class_='title-link') + h1s = soup.find('div', class_='nw-c-top-stories__primary-item')\ + .find('a') h1s = (h1s['href'],) - h2s = soup.find_all('div', attrs={'class': 'pigeon__column', 'data-entityid': True}) - h2s = tuple(x.find('a', class_='title-link')['href'] for x in h2s) + h2s = soup.find_all('div', class_='nw-c-top-stories__secondary-item') + h2s = tuple(x.find('a')['href'] for x in h2s) # get tertiary headlines - h3s = soup.find_all('div', attrs={'class': 'macaw-item', 'data-entityid': True}) - h3s = tuple(x.find('a', class_='title-link')['href'] for x in h3s) + h3s = soup.find_all('div', class_='nw-c-top-stories__tertiary-items') + #from pdb import set_trace; set_trace() + h3s = tuple(x.find('a')['href'] for x in h3s) return h1s, h2s, h3s |