Skip to content

Instantly share code, notes, and snippets.

@poc7667
Last active December 20, 2015 13:19
Show Gist options
  • Select an option

  • Save poc7667/6137933 to your computer and use it in GitHub Desktop.

Select an option

Save poc7667/6137933 to your computer and use it in GitHub Desktop.
Beautifulsoup Notes
# fine Group and Subgroup, in <p> tag
grp_list=['Group','Subgroup']
grps = soup.find('body').findAll('p',text =re.compile('|'.join(grp_list)))
#remove \r\n , special characters by split + join
# 8. Useful\r\nFunctions' => 8. Useful Functions
print( ' '.join(belong_to_chap.split()))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment