0

My code:

mug_cup_link = '.....'
mc_source = urlopen(mug_cup_link).read()
name=findall('<a href="" >".*"</a>',mc_source)

I am searching for multiple names, not just a single one.

1 Answers1

1

If you want to use regular expressions you to change you re this way

import re
s = """<a href="https://zombieunlimited.com/rancid-santa-mug/" >Rancid Santa Mug</a> """
print(re.search('<a.*>(.*)<\/a>', s).start(1))

Hope it works for you!

Andrea Pollini
  • 292
  • 4
  • 8