Skip to content

Commit 9ac8671

Browse files
authored
Merge pull request #147 from pyviz-dev/new_bokeh_index_fix
Fix gallery endpoint lookup for new bokeh index page
2 parents bc3fe54 + 0531566 commit 9ac8671

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

nbsite/gallery/gen.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,9 @@ def generate_file_rst(app, src_dir, dest_dir, page, section, backend,
234234
r = requests.get(endpoint)
235235
if r.status_code == 200:
236236
soup = bs4.BeautifulSoup(r.content, features='lxml')
237-
deployed_examples = [l.text for l in soup.find('ul').find_all('a')]
237+
deployed_examples = [l.text for l in soup.find('div', {"class": "list-group"}).find_all('h4')]
238+
if not deployed_examples:
239+
deployed_examples = [l.text for l in soup.find('ul').find_all('a')]
238240

239241
for f in files:
240242
extension = f.split('.')[-1]

0 commit comments

Comments
 (0)