Skip to content

Instantly share code, notes, and snippets.

@WillKoehrsen
Created December 31, 2018 19:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save WillKoehrsen/b05804c0e05f1a5f84d6f668123a205c to your computer and use it in GitHub Desktop.
Save WillKoehrsen/b05804c0e05f1a5f84d6f668123a205c to your computer and use it in GitHub Desktop.
entry = table[0]
# Reading time
read_time = int(entry.find_all(attrs={'class': 'readingTime'})[0].get('title').split(' ')[0])
# Unlisted vs published
type = 'unlisted' if len(entry.find_all(text=' Unlisted')) > 0 else 'published'
# Publication
publication = entry.find_all(attrs={'class': 'sortableTable-text'})
if 'In' in publication[0].text:
publication_name = publication[0].text.split('In ')[1].split('View')[0]
else:
publication_name = 'None'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment