Use webmagic to crawl the title

I now have a project that needs webmagic to crawl the title, but the title of this site has two styles xpath

xpath("//div[@class="title"]/text()"),
3
css("div.title")



this is not what I need

I don"t know if there is a way to set up a xpath or use css and regular expressions to complete crawling all the headings
everybody help, because the first contact with the crawler has a lot of do not understand, thank you

May.27,2022

just change xpath ("/ / div [@ class=" title "] / text ()") to xpath ("/ / div [@ class=" title "] / allText ()")

Menu