<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Videos on A&#43; programming moments</title>
    <link>https://aplus.rs/tags/videos/</link>
    <description>Recent content in Videos on A&#43; programming moments</description>
    <generator>Hugo -- gohugo.io</generator>
    <language>en-US</language>
    <lastBuildDate>Thu, 13 Sep 2018 10:54:00 +0000</lastBuildDate>
    
	<atom:link href="https://aplus.rs/tags/videos/index.xml" rel="self" type="application/rss+xml" />
    
    
    <item>
      <title>How to download Apple developer videos</title>
      <link>https://aplus.rs/2018/how-to-download-apple-dev-videos/</link>
      <pubDate>Thu, 13 Sep 2018 10:54:00 +0000</pubDate>
      <guid>https://aplus.rs/2018/how-to-download-apple-dev-videos/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;https://developer.apple.com/videos/&#34;&gt;Videos&lt;/a&gt; on the Apple&amp;rsquo;s developer portal are an amazing resource. They are easy to search, have load of content, are updated over time as they have new useful resources.
So why would you want to download them locally?&lt;/p&gt;
&lt;p&gt;Apart from sometimes being easier to scrub around depending on the internet connection you have at hand, there is another benefit. Apple is known to sometimes remove older videos, when they deem the information in them outdated. But you may find yourself in a situation that you need just that specific older piece of information, maybe to debug an issue on older iOS versions. Or sometimes there is no equivalent newer documentation for the covered material.&lt;/p&gt;
&lt;p&gt;The scripts I use for few years back are based on some other script I can&amp;rsquo;t find now, tweaked to work properly for various HTML templates Apple is using. Unless Apple drastically alters their templates, it&amp;rsquo;s fairly easy to tweak these scripts for new stuff.
It will automatically download HD version of the videos and accompanying PDF of the slides, if they exist. Each created file will be named using session numerical code and title, say &lt;code&gt;201 - Title.mp4&lt;/code&gt;, so they will properly order per name.&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;WWDC videos are grouped per year and I like to keep them that way. Make a folder called &lt;code&gt;wwdc2018&lt;/code&gt;, create new text file called &lt;code&gt;fetch.sh&lt;/code&gt; inside it and paste this into it.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;cp&#34;&gt;#!/bin/bash
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;#Setup the environment&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;mkdir tmp_download
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nb&#34;&gt;cd&lt;/span&gt; tmp_download
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;#Extract IDs&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nb&#34;&gt;echo&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;Downloading the index&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;wget -q https://developer.apple.com/videos/wwdc2018/ -O index.html
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;#	find parts of the document where data-released=true, all the way to the first H4 header where title of that talk is &lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;#	then find lines containing &amp;#34;videos/play/wwdc2018&amp;#34;, then remove all chars except session number, then clean duplicated lines&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;cat index.html &lt;span class=&#34;p&#34;&gt;|&lt;/span&gt; sed -n &lt;span class=&#34;s1&#34;&gt;&amp;#39;/data-released=\&amp;#34;true\&amp;#34;/,/\&amp;lt;h4/p&amp;#39;&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;|&lt;/span&gt; grep videos/play/wwdc2018 &lt;span class=&#34;p&#34;&gt;|&lt;/span&gt; sed -e &lt;span class=&#34;s1&#34;&gt;&amp;#39;s/.*wwdc2018\///&amp;#39;&lt;/span&gt; -e &lt;span class=&#34;s1&#34;&gt;&amp;#39;s/\/\&amp;#34;\&amp;gt;//&amp;#39;&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;|&lt;/span&gt; sed &lt;span class=&#34;s1&#34;&gt;&amp;#39;$!N; /^\(.*\)\n\1$/!P; D&amp;#39;&lt;/span&gt; &amp;gt; ../downloadData
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;rm index.html
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;#Iterate through the talk IDs&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;while&lt;/span&gt; &lt;span class=&#34;nb&#34;&gt;read&lt;/span&gt; -r line
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;do&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;	&lt;span class=&#34;c1&#34;&gt;#Download the page with the real download URL and the talk name&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;	wget -q &lt;span class=&#34;s2&#34;&gt;&amp;#34;https://developer.apple.com/videos/play/wwdc2018/&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$line&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;/&amp;#34;&lt;/span&gt; -O webpage
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;	&lt;span class=&#34;c1&#34;&gt;#We grab the title of the page then clean it up&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;	&lt;span class=&#34;nv&#34;&gt;talkName&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;$(&lt;/span&gt;cat webpage &lt;span class=&#34;p&#34;&gt;|&lt;/span&gt; grep &lt;span class=&#34;s2&#34;&gt;&amp;#34;&amp;lt;title&amp;#34;&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;|&lt;/span&gt; sed -e &lt;span class=&#34;s2&#34;&gt;&amp;#34;s/.*\&amp;lt;title\&amp;gt;//&amp;#34;&lt;/span&gt; -e &lt;span class=&#34;s2&#34;&gt;&amp;#34;s/ \- WWDC 2018.*//&amp;#34;&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;	&lt;span class=&#34;c1&#34;&gt;#We grep &amp;#34;_hd_&amp;#34; which bring up the download URL, then some cleanup&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;	&lt;span class=&#34;c1&#34;&gt;#If we were to want SD video, all we would have to do is replace _hd_ by _sd_&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;	&lt;span class=&#34;nv&#34;&gt;dlURL&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;$(&lt;/span&gt;cat webpage &lt;span class=&#34;p&#34;&gt;|&lt;/span&gt; grep _hd_ &lt;span class=&#34;p&#34;&gt;|&lt;/span&gt; sed -e &lt;span class=&#34;s2&#34;&gt;&amp;#34;s/.*href\=//&amp;#34;&lt;/span&gt; -e &lt;span class=&#34;s2&#34;&gt;&amp;#34;s/\&amp;gt;.*//&amp;#34;&lt;/span&gt; -e &lt;span class=&#34;s2&#34;&gt;&amp;#34;s/\&amp;#34;//g&amp;#34;&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;	&lt;span class=&#34;nv&#34;&gt;pdfURL&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;$(&lt;/span&gt;cat webpage &lt;span class=&#34;p&#34;&gt;|&lt;/span&gt; grep .pdf &lt;span class=&#34;p&#34;&gt;|&lt;/span&gt; grep devstreaming &lt;span class=&#34;p&#34;&gt;|&lt;/span&gt; sed -e &lt;span class=&#34;s2&#34;&gt;&amp;#34;s/.*href\=//&amp;#34;&lt;/span&gt; -e &lt;span class=&#34;s2&#34;&gt;&amp;#34;s/\&amp;gt;.*//&amp;#34;&lt;/span&gt; -e &lt;span class=&#34;s2&#34;&gt;&amp;#34;s/\&amp;#34;//g&amp;#34;&lt;/span&gt;  -e &lt;span class=&#34;s2&#34;&gt;&amp;#34;s/ .*&lt;/span&gt;$&lt;span class=&#34;s2&#34;&gt;//g&amp;#34;&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;	rm webpage
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;	&lt;span class=&#34;c1&#34;&gt;#Is there a video URL?&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;	&lt;span class=&#34;k&#34;&gt;if&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt; -z &lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$dlURL&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;]&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt; &lt;span class=&#34;k&#34;&gt;then&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;		&lt;span class=&#34;nb&#34;&gt;echo&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;	&lt;span class=&#34;k&#34;&gt;else&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;		&lt;span class=&#34;nb&#34;&gt;echo&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;Video &lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$line&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt; (&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$talkName&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;)&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;		&lt;span class=&#34;nb&#34;&gt;echo&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;	url: &lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$dlURL&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;		&lt;span class=&#34;c1&#34;&gt;#Great, we download the file&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;		wget -c &lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$dlURL&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt; -O &lt;span class=&#34;s2&#34;&gt;&amp;#34;../&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$line&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt; - &lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$talkName&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;.mp4&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;	&lt;span class=&#34;k&#34;&gt;fi&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;	&lt;span class=&#34;c1&#34;&gt;#Is there a PDF URL?&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;	&lt;span class=&#34;k&#34;&gt;if&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt; -z &lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$pdfURL&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;]&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt; &lt;span class=&#34;k&#34;&gt;then&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;		&lt;span class=&#34;nb&#34;&gt;echo&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;	&lt;span class=&#34;k&#34;&gt;else&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;		&lt;span class=&#34;nb&#34;&gt;echo&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;PDF &lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$line&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt; (&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$talkName&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;)&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;		&lt;span class=&#34;nb&#34;&gt;echo&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;	url: &lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$pdfURL&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;		&lt;span class=&#34;c1&#34;&gt;#Great, we download the file&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;		wget -c &lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$pdfURL&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt; -O &lt;span class=&#34;s2&#34;&gt;&amp;#34;../&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$line&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt; - &lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$talkName&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;.pdf&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;	&lt;span class=&#34;k&#34;&gt;fi&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;done&lt;/span&gt; &amp;lt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;../downloadData&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;#cleanup&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nb&#34;&gt;cd&lt;/span&gt; ..
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;rm -rf tmp_download
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;rm downloadData
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;When you want to switch from 2018 to 2019 (or 2017 or whichever) – make new folder, copy this same &lt;code&gt;fetch.sh&lt;/code&gt; into it and search &amp;amp; replace 2018 with the appropriate year.&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;&lt;a href=&#34;https://developer.apple.com/videos/play/tech-talks/&#34;&gt;Tech Talks&lt;/a&gt; script is almost identical, with altered URL path and web page title.&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;#!/bin/bash

#Setup the environment
mkdir tmp_download
cd tmp_download

#Extract IDs
echo &amp;#34;Downloading the index&amp;#34;
wget -q https://developer.apple.com/videos/tech-talks/ -O index.html
#	find parts of the document where data-released=true, all the way to the first H4 header where title of that talk is 
#	then find lines containing &amp;#34;videos/play/tech-talks&amp;#34;, then remove all chars except session number, then clean duplicated lines
cat index.html | sed -n &amp;#39;/data-released=\&amp;#34;true\&amp;#34;/,/\&amp;lt;h4/p&amp;#39; | grep videos/play/tech-talks | sed -e &amp;#39;s/.*tech-talks\///&amp;#39; -e &amp;#39;s/\/\&amp;#34;\&amp;gt;//&amp;#39; | sed &amp;#39;$!N; /^\(.*\)\n\1$/!P; D&amp;#39; &amp;gt; ../downloadData

rm index.html

#Iterate through the talk IDs
while read -r line
do
	#Download the page with the real download URL and the talk name
	wget -q &amp;#34;https://developer.apple.com/videos/play/tech-talks/$line/&amp;#34; -O webpage

	#We grab the title of the page then clean it up
	talkName=$(cat webpage | grep &amp;#34;&amp;lt;title&amp;#34; | sed -e &amp;#34;s/.*\&amp;lt;title\&amp;gt;//&amp;#34; -e &amp;#34;s/ \- Tech Talks.*//&amp;#34;)

	#We grep &amp;#34;_hd&amp;#34; which bring up the download URL, then some cleanup
	#If we were to want SD video, all we would have to do is replace _hd by _sd
	dlURL=$(cat webpage | grep _hd | sed -e &amp;#34;s/.*href\=//&amp;#34; -e &amp;#34;s/\&amp;gt;.*//&amp;#34; -e &amp;#34;s/\&amp;#34;//g&amp;#34;)
	pdfURL=$(cat webpage | grep .pdf | grep devstreaming | sed -e &amp;#34;s/.*href\=//&amp;#34; -e &amp;#34;s/\&amp;gt;.*//&amp;#34; -e &amp;#34;s/\&amp;#34;//g&amp;#34;  -e &amp;#34;s/ .*$//g&amp;#34;)

	rm webpage

	#Is there a video URL?
	if [ -z &amp;#34;$dlURL&amp;#34; ]; then
		echo
	else
		echo &amp;#34;Video $line ($talkName)&amp;#34;
		echo &amp;#34;	url: $dlURL&amp;#34;
		#Great, we download the file
		wget -c &amp;#34;$dlURL&amp;#34; -O &amp;#34;../$line - $talkName.mp4&amp;#34;
	fi

	#Is there a PDF URL?
	if [ -z &amp;#34;$pdfURL&amp;#34; ]; then
		echo
	else
		echo &amp;#34;PDF $line ($talkName)&amp;#34;
		echo &amp;#34;	url: $pdfURL&amp;#34;
		#Great, we download the file
		wget -c &amp;#34;$pdfURL&amp;#34; -O &amp;#34;../$line - $talkName.pdf&amp;#34;
	fi

done &amp;lt; &amp;#34;../downloadData&amp;#34;

#cleanup
cd ..
rm -rf tmp_download
rm downloadData
&lt;/code&gt;&lt;/pre&gt;&lt;hr&gt;
&lt;p&gt;&lt;a href=&#34;https://developer.apple.com/videos/play/app-store-connect/105/&#34;&gt;App Store Connect&lt;/a&gt; script, again with just slight changes for URL and web page title.&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;#!/bin/bash

#Setup the environment
mkdir tmp_download
cd tmp_download

#Extract IDs
echo &amp;#34;Downloading the index&amp;#34;
wget -q https://developer.apple.com/videos/app-store-connect/ -O index.html
#	find parts of the document where data-released=true, all the way to the first H4 header where title of that talk is 
#	then find lines containing &amp;#34;videos/play/app-store-connect&amp;#34;, then remove all chars except session number, then clean duplicated lines
cat index.html | sed -n &amp;#39;/data-released=\&amp;#34;true\&amp;#34;/,/\&amp;lt;h4/p&amp;#39; | grep videos/play/app-store-connect | sed -e &amp;#39;s/.*app-store-connect\///&amp;#39; -e &amp;#39;s/\/\&amp;#34;\&amp;gt;//&amp;#39; | sed &amp;#39;$!N; /^\(.*\)\n\1$/!P; D&amp;#39; &amp;gt; ../downloadData

rm index.html

#Iterate through the talk IDs
while read -r line
do
	#Download the page with the real download URL and the talk name
	wget -q &amp;#34;https://developer.apple.com/videos/play/app-store-connect/$line/&amp;#34; -O webpage

	#We grab the title of the page then clean it up
	talkName=$(cat webpage | grep &amp;#34;&amp;lt;title&amp;#34; | sed -e &amp;#34;s/.*\&amp;lt;title\&amp;gt;//&amp;#34; -e &amp;#34;s/ \- App Store Connect.*//&amp;#34;)

	#We grep &amp;#34;_hd&amp;#34; which bring up the download URL, then some cleanup
	#If we were to want SD video, all we would have to do is replace _hd by _sd
	dlURL=$(cat webpage | grep _hd | sed -e &amp;#34;s/.*href\=//&amp;#34; -e &amp;#34;s/\&amp;gt;.*//&amp;#34; -e &amp;#34;s/\&amp;#34;//g&amp;#34;)
	pdfURL=$(cat webpage | grep .pdf | grep devstreaming | sed -e &amp;#34;s/.*href\=//&amp;#34; -e &amp;#34;s/\&amp;gt;.*//&amp;#34; -e &amp;#34;s/\&amp;#34;//g&amp;#34;  -e &amp;#34;s/ .*$//g&amp;#34;)

	rm webpage

	#Is there a video URL?
	if [ -z &amp;#34;$dlURL&amp;#34; ]; then
		echo
	else
		echo &amp;#34;Video $line ($talkName)&amp;#34;
		echo &amp;#34;	url: $dlURL&amp;#34;
		#Great, we download the file
		wget -c &amp;#34;$dlURL&amp;#34; -O &amp;#34;../$line - $talkName.mp4&amp;#34;
	fi

	#Is there a PDF URL?
	if [ -z &amp;#34;$pdfURL&amp;#34; ]; then
		echo
	else
		echo &amp;#34;PDF $line ($talkName)&amp;#34;
		echo &amp;#34;	url: $pdfURL&amp;#34;
		#Great, we download the file
		wget -c &amp;#34;$pdfURL&amp;#34; -O &amp;#34;../$line - $talkName.pdf&amp;#34;
	fi

done &amp;lt; &amp;#34;../downloadData&amp;#34;

#cleanup
cd ..
rm -rf tmp_download
rm downloadData
&lt;/code&gt;&lt;/pre&gt;&lt;h3 id=&#34;usage&#34;&gt;Usage&lt;/h3&gt;
&lt;p&gt;Open the desired folder in Terminal and type &lt;code&gt;sh fetch.sh&lt;/code&gt;; make sure your computer does not go to sleep. You can stop and re-start as you please.
You can run these scripts many times, they will smartly check the local files and resume where they left off. Scripts are using wget, the version I have is:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;$ wget --version
GNU Wget 1.19.4 built on darwin17.3.0.
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;I got it through &lt;a href=&#34;https://brew.sh&#34;&gt;Homebrew&lt;/a&gt;, as anything else command-line related.&lt;/p&gt;
&lt;p&gt;Have fun. This is really useful today, since Apple just updated Tech Talks section with iPhone Xs and Watch Series 4 content.&lt;/p&gt;
</description>
    </item>
    
  </channel>
</rss>