I am new to Python and I am trying to get alt and images source from a website, but I am facing problem with the quote '
and "
import requests,urllib,urllib2,re
rule = re.compile(r'^[^*$<,>?!\']*$')
r = requests.get('http://www.hotstar.com/channels/star-plus')
match = re.compile('<img alt="(.*?)" ng-mouseleave="mouseLeaveCard()" ng-mouseenter="mouseEnterCard()" ng-click="mouseEnterCard(true)" ng-class="{\'dull-img\': isThumbnailTitleVisible || isRegionalLanguageVisible}" class="show-card imgtag card-minheight-hc ng-scope ng-isolate-scope" placeholder-img="{\'realUrl\' : \'(.*?)\', \'placeholderUrl\' : \'./img/placeholder/hs.jpg\'}" ng-if="record.urlPictures" src="(.*?)" style="display: block;">',re.DOTALL).findall(r.content)
for name,img,image in match:
I can only use the standard Python library.
I've read about defining rule so I did from this: Regex Apostrophe how to match?
Honestly, I don't know how to use it.
Thanks in advance