Skip to content

Commit 76be04b

Browse files
Fix a bug with the wiki format changing
1 parent e6a2895 commit 76be04b

File tree

3 files changed

+20
-4
lines changed

3 files changed

+20
-4
lines changed

doc/source/globals.rst

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -320,6 +320,16 @@ File IO
320320

321321
.. autofunction:: write_table
322322

323+
:hide:`scan_dir()`
324+
^^^^^^^^^^^^^^^^^^
325+
326+
.. autofunction:: scan_dir
327+
328+
:hide:`replace()`
329+
^^^^^^^^^^^^^^^^^
330+
331+
.. autofunction:: replace
332+
323333
:hide:`hash256()`
324334
^^^^^^^^^^^^^^^^^
325335

fpclib/__init__.py

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -668,11 +668,17 @@ def get_fpdata(page, ignore_errs=True):
668668
soup = get_soup('https://bluemaxima.org/flashpoint/datahub/' + page, ignore_errs=False)
669669

670670
items = []
671+
i = 0
672+
if page == "Platforms": i = 1
673+
671674
for table in soup.find_all('table', class_='wikitable'):
672675
for row in table.find_all('tr')[1:]:
673-
name = row.find('td').text.strip()
674-
if name:
675-
items.append(name)
676+
try:
677+
name = row.find_all('td')[i].text.strip()
678+
if name:
679+
items.append(name)
680+
except:
681+
pass
676682

677683
if page == 'Tags':
678684
items.extend([item.text for item in soup.find_all('span', class_='mw-headline') if item.text not in {'Themes', 'Content Warnings', 'Franchises', 'Game Engines'}])

metadata.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ def get_build():
1414
file.write(str(build))
1515

1616
NAME = 'fpclib'
17-
RELEASE = '1.4.0.' + get_build()
17+
RELEASE = '1.5.1.' + get_build()
1818
VERSION = re.match('\d+\.\d+', RELEASE).group(0)
1919
AUTHOR = 'mathgeniuszach'
2020
EMAIL = 'huntingmanzach@gmail.com'

0 commit comments

Comments
 (0)