Answer the question
In order to leave comments, you need to log in
BS4 does not see new videos, how to fix?
When a video appears on the channel I need, bs4 does not see it for some reason. Here is the code
def parseYoutubeChanel(channelurl):
urlPage = urlopen(channelurl)
xmlData = urlPage.read().decode('utf-8')
new_video = BeautifulSoup(xmlData, 'lxml')
for lnk in new_video.findAll('a', href=True):
linkspage = lnk['href']
startLink = linkspage[:6]
if startLink == '/watch':
newLink = 'http://youtube.com' + linkspage
listvideoUrlLink.append(newLink)
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question