网页爬虫遍历不同页码的时候,发现出现格式小范围变化~~导致想要获取的信息换了位置。如果A标签找不到,则找B标签的值,这个要怎么写?求各级专家指点~
这样写
div = ..... if not div: div = ...