0
我想從div.class YT-鎖止內容的href
屬性,但它返回null
是我做錯了嗎?提取HREF從其他H3 /類類中的一類具有jsoup
<div class="yt-lockup-content">
<h3 class="yt-lockup-title "><a class="yt-uix-sessionlink yt-uix-tile-link spf-link yt-ui-ellipsis yt-ui-ellipsis-2" dir="ltr" title="Live :: PTV Sports Official Live Transmission" data-sessionlink="ei=K8uGWMHkGMWjcp7dhNAJ&feature=c4-live-promo" href="/watch?v=8M00cos0d_0">Live :: PTV Sports Official Live Transmission</a></h3>
此代碼我試過到目前爲止:
rssDocument = Jsoup.connect("https://www.youtube.com/channel/UC0KT03NPnN-j4HGzetW9Lpw/featured").timeout(6000).ignoreContentType(true).parser(Parser.htmlParser()).get();
Elements firstH1 = rssDocument.select("div.yt-lockup-content > h3 > a");
我需要得到這個網址:href="/watch?v=8M00cos0d_0"
它不適合我 – Hamza