Using re.findall to create a link grabber in Python -


so going try , create scrapper friend. basically, want take links website. that's it.

i know around lines of:

links = re.findall() print links 

i found re.finall on web, not sure how use it! pointers in right direction lot!

try beautifulsoup instead. handles crappy html , presents nice interface parsing html. plus, it's easy use. here's scraper (straight from docs):

for link in soup.find_all('a'):     print(link.get('href')) 

Comments

Popular posts from this blog

vb.net - Alternative to the T-SQL AS keyword -

php - MySQLi binding parameters in a prepared statement doesn't work unless inserted after "WHERE" -

ios - UICollectionView Self Sizing Cells with Auto Layout -