MCPcopy Create free account
hub / github.com/geekcomputers/Python / get_video_links

Function get_video_links

pythonVideoDownloader.py:16–31  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

14
15
16def get_video_links():
17 # create response object
18 r = requests.get(archive_url)
19
20 # create beautiful-soup object
21 soup = BeautifulSoup(r.content, "html5lib")
22
23 # find all links on web-page
24 links = soup.findAll("a")
25
26 # filter the link sending with .mp4
27 video_links = [
28 archive_url + link["href"] for link in links if link["href"].endswith("mp4")
29 ]
30
31 return video_links
32
33
34def download_video_series(video_links):

Callers 1

Calls 1

getMethod · 0.45

Tested by

no test coverage detected