Bonjour,
Je suis débutante et j'ai un problème de recherche d'expression régulière...
Quelqu'un saurait me dire ce qui cloche ?
Merci !
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10 import re import urllib i=0 tdg = urllib.urlopen("http://www.tdg.ch/") while(i==0): lineTDG = tdg.readlines() if re.search(r 'h1_frontpage', lineTDG): print lineTDG i+=1
Partager