ljhopkins2 / broadcastify-archtk

The Broadcastify Archive Toolkit for python
https://ljhopkins2.github.io/broadcastify-archtk/
GNU Affero General Public License v3.0
8 stars 9 forks source link

"Hide" import variables to end user under main module #9

Closed ljhopkins2 closed 5 years ago

ljhopkins2 commented 5 years ago

Line 468 throwing error when calling regex under _re.

TypeError                                 Traceback (most recent call last)
<ipython-input-6-d954691b20a4> in <module>
----> 1 archive.build(0)

~/data_science/personal_projects/BArT/v1.0/bart_v1.py in build(self, days_back, rebuild)
    372 
    373             mp3_soup = dn.get_download_soup(uri)
--> 374             mp3_path = self.__parse_mp3_path(mp3_soup)
    375 
    376             self.entries.append(_ArchiveEntry(self.feed_id,

~/data_science/personal_projects/BArT/v1.0/bart_v1.py in __parse_mp3_path(self, download_page_soup)
    466         """Parse the mp3 filepath from a BeautifulSoup of the download page"""
    467         return download_page_soup.find('a',
--> 468                                        {'href': _re('.mp3')}
    469                                        ).attrs['href']
    470 

TypeError: 'module' object is not callable
ljhopkins2 commented 5 years ago

Fixed. Needed _re.compile(