Actionscript 3 - get data from website header with RegExp
$30-250 USD
进行中
已发布超过 12 年前
$30-250 USD
货到付款
Following is a typical header from a website:
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="Imagetoolbar" content="">
<meta name="description" content="Yahoo! Answers is a new way to find and share information. You can ask questions on any topic, get answers from real people, and share your insights and experience.">
<meta name="keywords" content="answers, questions, questions and answers, information, knowledge">
<meta name="title" content="Yahoo! Answers - Home">
<title>Yahoo! Answers - Home</title>
<link rel="shortcut icon" href="[login to view URL]">
<link rel="alternate" type="application/rss+xml" title="Yahoo! Answers: Latest Questions" href="/rss/allq">
<link rel="stylesheet" type="text/css" media="screen" href="[login to view URL]">
<link rel="stylesheet" type="text/css" media="print" href="[login to view URL]">
<script type="text/javascript" src="[login to view URL]"></script>
</head>
The above is a relatively simple example. Some website headers are much more complex, but most have the favicon in the <link rel="shortcut icon" href="[login to view URL]">
I want an Actionscript 3 regular expression that will:
1. first, isolate the link containing the favicon. Note that while most favicons are in the .ico file format, I have seen sites that use a .png or .gif formats,
2. while 16px x 16px favicons are standard, some websites have favicons with multiple sizes (16x16, 32x32, and even higher) - I need the 16x16 favicon,
3. if the favicon is not in the .png fileformat it should be converted to a .png format
Please let me know if you have any questions.
thanks!