Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
遇到小问题,刚刚修改了我的 python 模块以匹配新的 html 模板,但是如果我使用它会给我一个错误,在旧模块中工作正常你能指出我必须做什么才能使用新模块并更新我的网站模板。
Well, you're matching a different regex:
html_post_start = re.search('<div class="articleline2"></div>', html)
vs
html_post_start = re.search('<div class="excerpt"></div>', html)
One matches, the other doesn't (returning None).
None