Commit 040ee69c authored by Jonny Schäfer's avatar Jonny Schäfer
Browse files

update for video search new and user

parent 9a4f3bfe
...@@ -23,7 +23,7 @@ type videoSort struct { ...@@ -23,7 +23,7 @@ type videoSort struct {
var ( var (
videoPatternSearch = regexp.MustCompile(`<div class="yt-lockup-content">.*?href="/watch\?v=(.*?)("|\&).*?title="(.*?)".*?> - Duration: (.*?)\..*?<a href="/user/(.*?)".*?<li>(.*?) ago</li>.*?<li>(.*?) views</li>`) videoPatternSearch = regexp.MustCompile(`<div class="yt-lockup-content">.*?href="/watch\?v=(.*?)("|\&).*?title="(.*?)".*?> - Duration: (.*?)\..*?<a href="/user/(.*?)".*?<li>(.*?) ago</li>.*?<li>(.*?) views</li>`)
videoPatternUser = regexp.MustCompile(`<h3 class="yt-lockup-title ">.*?title="(.*?)".*?href="/watch\?v=(.*?)("|\&).*?> - Duration: (.*?)\.(?s:.*?)<li>(.*?) views</li>.*?<li>(.*?) ago</li>`) videoPatternUser = regexp.MustCompile(`<h3 class="yt-lockup-title.*?title="(.*?)".*?href="/watch\?v=(.*?)("|\&).*?> - Duration: (.*?)\.(?s:.*?)<li>(.*?) views</li>.*?<li>(.*?) ago</li>`)
) )
// videoList returns a list of found videos of the given page. If an error occured nil is returned. // videoList returns a list of found videos of the given page. If an error occured nil is returned.
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment