summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--debian/changelog5
-rw-r--r--debian/control4
-rw-r--r--downtube.cpp7
3 files changed, 11 insertions, 5 deletions
diff --git a/debian/changelog b/debian/changelog
index 3807d8c..7f8598b 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,8 +1,9 @@
-downtube (1.1) UNRELEASED; urgency=medium
+downtube (1.1) unstable; urgency=medium
* Enable MP4 / video download
+ * Fix link regex for more available videos
- -- Roland Reichwein <rr@antcom.de> Sun, 31 May 2020 13:19:30 +0200
+ -- Roland Reichwein <rr@antcom.de> Wed, 17 Jun 2020 12:02:39 +0200
downtube (1.0) unstable; urgency=medium
diff --git a/debian/control b/debian/control
index 492d660..a523452 100644
--- a/debian/control
+++ b/debian/control
@@ -8,8 +8,8 @@ Homepage: http://www.reichwein.it/downtube/
Package: downtube
Architecture: any
-Depends: ${shlibs:Depends}, ${misc:Depends}, spawn-fcgi
-Recommends: webserver
+Depends: ${shlibs:Depends}, ${misc:Depends}, spawn-fcgi, ffmpeg
+Recommends: webserver, youtube-dl
Homepage: http://www.reichwein.it/downtube/
Description: Web application for video download
Downtube can help you download a video specified in a HTML form, transformed
diff --git a/downtube.cpp b/downtube.cpp
index 6e45764..7fd8b66 100644
--- a/downtube.cpp
+++ b/downtube.cpp
@@ -52,7 +52,7 @@ namespace {
const fs::path& getPath() const {return m_path;}
};
- std::regex re{"https?://(www\\.youtube\\.com/watch\\?v=|youtu\\.be/)[[:alnum:]-]+", std::regex::extended}; // www.youtube.com/watch?v=ItjMIxS3-rI or https://youtu.be/ItjMIxS3-rI
+ std::regex re{"https?://(www\\.youtube\\.com/watch\\?v=|youtu\\.be/)[[:alnum:]_&=-]+", std::regex::extended}; // www.youtube.com/watch?v=ItjMIxS3-rI or https://youtu.be/ItjMIxS3-rI
} // anonymous namespace
@@ -113,6 +113,11 @@ int main(void)
throw std::runtime_error("Bad URL");
}
+ // remove trailing "&..."
+ size_t and_pos {url.find('&')};
+ if (and_pos != std::string::npos)
+ url = url.substr(0, and_pos);
+
//FCGX_FPrintF(request.out, "command: %s\r\n", command.c_str());
TempDir tempDir;