Exemple #1
0
    def finder_sohu(self, raw):
        try:
            count = s.cut_tail(raw.split('=')[1], ';')

            return {'playCount': count}
        except:
            pass
Exemple #2
0
 def finder_need_tag(tag, need_tag=False, next_sibling=False, next_sibling_text=False, get_text=False, ruler_pair:()=None):
     if need_tag:
         return tag
     elif next_sibling_text:
         return tag.next_sibling.text
     elif next_sibling:
         if ruler_pair is not None:
             ruler_pair[0] = Sh.cut_tail(ruler_pair[0], '-')
             return (ruler_pair[0], str(tag.next_sibling))
     elif get_text:
         return tag.get_text()
     else:
         return tag.text