Heim  >  Fragen und Antworten  >  Hauptteil

python - 用BeautifulSoup如何提取data-lazy-src属性?

<img alt="看图猜国籍啦~" src-src="http://wx4.sinaimg.cn/mw600/7... src="http://www.xrr.com/wp-content...

用BeautifulSoup如何提取src-src属性?
我提取src用['src']可以直接提取,用['src-src']就不行了,搞了一个早上都不行,烦~

阿神阿神2741 Tage vor805

Antworte allen(1)Ich werde antworten

  • 天蓬老师

    天蓬老师2017-04-18 10:33:02

    img['src-src']

    我试了一下,是可以提取的,你确认你的源码里有这个么,可能是异步加载的么

    Antwort
    0
  • StornierenAntwort