C#-如何从URL获取所有标题和图像?

我想从URL标题(文本)中获得以下样式:

title="Hello World!"

来自URL源代码。我该怎么做?我找到了此样式标题的解决方案:

<title>Hello World!</title>

并尝试以下代码:

WebClient x = new WebClient();
string source = x.DownloadString("https://www.skroutz.gr/c/40/kinhta-thlefwna.html?from=families");

string title = Regex.Match(source, @"\<title\b[^>]*\>\s*(?<Title>[\s\S]*?)\ 
                           </title\>",RegexOptions.IgnoreCase).Groups["Title"].Value;

但我不希望那样,因为只给我标题。

如何从URL /链接获取所有标题(文本),图像(图像)?

For example when I give a link with movies (www.example-movies-list.com/allmovies) then I want get all titles and images from the source-code with title style: title="Movie Title".

评论