Mercurial > hg > egg-tcls
comparison urllog.tcl @ 472:04b629038256
urllog: Fix the Twitter title parsing.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Fri, 26 Oct 2018 15:42:28 +0300 |
parents | 2faf2eb18f26 |
children | d155cec91375 |
comparison
equal
deleted
inserted
replaced
471:6ea3977f4460 | 472:04b629038256 |
---|---|
488 urllog_log "Charsets: http='$uenc_http', doc='$uenc_doc' / sanitized http='$uenc_http2', doc='$uenc_doc2' -> '$uencoding'" | 488 urllog_log "Charsets: http='$uenc_http', doc='$uenc_doc' / sanitized http='$uenc_http2', doc='$uenc_doc2' -> '$uencoding'" |
489 | 489 |
490 # Get the document title, if any | 490 # Get the document title, if any |
491 set urlTitle "" | 491 set urlTitle "" |
492 | 492 |
493 if {[regexp -nocase -- "<meta name=\"twitter:title\" content=\"(.\*\?)\"\/>" $udata umatches urlTitle]} { | 493 if {[regexp -nocase -- "<meta name=\"twitter:title\" content=\"(.\*\?)\"\/\?>" $udata umatches urlTitle]} { |
494 # ... | 494 # ... |
495 } elseif {[regexp -nocase -- "<title.\*\?>(.\*\?)</title>" $udata umatches urlTitle]} { | 495 } elseif {[regexp -nocase -- "<title.\*\?>(.\*\?)</title>" $udata umatches urlTitle]} { |
496 # ... | 496 # ... |
497 } | 497 } |
498 | 498 |