Skip to content

Commit

Permalink
fixed time scraper
Browse files Browse the repository at this point in the history
  • Loading branch information
dersphere committed Nov 15, 2012
1 parent f0d0531 commit 8ed7605
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion resources/lib/scrapers/6_time.py
Expand Up @@ -28,7 +28,8 @@ def _get_albums(self):
def _get_photos(self, album_url): def _get_photos(self, album_url):
self.photos = [] self.photos = []
tree = self._get_tree(album_url) tree = self._get_tree(album_url)
album_title = tree.find('h1').string entry_top = tree.find('div', {'class': 'entry-top'})
album_title = entry_top.find('h1').string or ''
js_code = tree.find('text/javascript', text=re.compile('var images')) js_code = tree.find('text/javascript', text=re.compile('var images'))
json_photos = re.search('var images = (\[.*?"ID":0.*?\])', js_code).group(1) json_photos = re.search('var images = (\[.*?"ID":0.*?\])', js_code).group(1)
photos = json.loads(json_photos) photos = json.loads(json_photos)
Expand Down

0 comments on commit 8ed7605

Please sign in to comment.