[issue16513] SGMLParser processing which include two will have problem

2012-11-20 Thread Ezio Melotti
Ezio Melotti added the comment: Sorry, I misread your code, looks like you want the href *without* 'cve'. In that case change my code to use "'cve' not in attrs['href']" (also avoid using s.find('cve') == -1 , and use the more readable and idiomatic 'cve' not in s ). I think your original sc

[issue16513] SGMLParser processing which include two will have problem

2012-11-20 Thread Ezio Melotti
Ezio Melotti added the comment: If what you are trying to do is extracting the link(s) that contain 'cve', you try the attached script. -- Added file: http://bugs.python.org/file28050/issue16513.py ___ Python tracker

[issue16513] SGMLParser processing which include two will have problem

2012-11-20 Thread moonflow
moonflow added the comment: I haven't tried it, the problem will not process? -- ___ Python tracker ___ ___ Python-bugs-list mailing l

[issue16513] SGMLParser processing which include two will have problem

2012-11-20 Thread Ezio Melotti
Ezio Melotti added the comment: Have you tried with HTMLParser? sgmllib is deprecated and has been removed in Python 3. HTMLParser is also much better at parsing (broken) HTML. -- nosy: +ezio.melotti ___ Python tracker