Skip to content

Instantly share code, notes, and snippets.

@jakes2255
Last active August 25, 2019 07:00
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 jakes2255/1272ac20d9d6298f2fc2a70f9ec2493e to your computer and use it in GitHub Desktop.
Save jakes2255/1272ac20d9d6298f2fc2a70f9ec2493e to your computer and use it in GitHub Desktop.
# loop for retrieving div tags
for eachDiv in divs:
hrefS = re.findall(r'title=(.*?)>', str(eachDiv))
for hRef in hrefS: # loop for retrieving only titles in the relevent divs
print(hRef)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment