基本信息
源码名称:蓝奏云地址解析
源码大小:0.34M
文件格式:.zip
开发语言:C#
更新时间:2019-03-01
   友情提示:(无需注册或充值,赞助后即可获取资源下载链接)

     嘿,亲!知识可是无价之宝呢,但咱这精心整理的资料也耗费了不少心血呀。小小地破费一下,绝对物超所值哦!如有下载和支付问题,请联系我们QQ(微信同号):78630559

本次赞助数额为: 2 元 
   源码介绍

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.IO;
using System.Net;
using System.Text.RegularExpressions;

namespace 更新程序
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }
        	public string Get_Html(string url)
		{
			string text = "";
			HttpWebRequest httpWebRequest = WebRequest.Create(url) as HttpWebRequest;
			httpWebRequest.Method = "GET";
			httpWebRequest.Timeout = 6000;
            httpWebRequest.UserAgent = "Mozilla/5.0 (Linux; U; Android 2.2; en-us; Nexus One Build/FRF91) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1";
            string result;
			try
			{
				using (HttpWebResponse httpWebResponse = (HttpWebResponse)httpWebRequest.GetResponse())
				{
					using (StreamReader streamReader = new StreamReader(httpWebResponse.GetResponseStream(), Encoding.UTF8))
					{
						text = streamReader.ReadToEnd();
						streamReader.Close();
						httpWebResponse.Close();
					}
				}
				result = text;
			}
			catch
			{
				result = null;
			}
            string text7 = "urlp = '";
            string text8 = "'";
            string text9 = new Regex(string.Concat(new string[]
            {
                                "(?<=(",
                                text7,
                                "))[.\\s\\S]*?(?=(",
                                text8,
                                "))"
            }), RegexOptions.Multiline | RegexOptions.Singleline).Match(text).Value;
            string text10 = "submit.href = urlp";
            string text11 = "}";
            string text12 = new Regex(string.Concat(new string[]
            {
                                "(?<=(",
                                text10,
                                ")).*?(?=(",
                                text11,
                                "))"
            }), RegexOptions.Multiline | RegexOptions.Singleline).Match(text).Value;
            result = (text9  text12).Replace("'", "").Replace("   ?", "?");
            if (result != "")
            {
                HttpWebRequest httpWebRequest8 = (HttpWebRequest)WebRequest.Create(result);
                httpWebRequest8.Headers.Add("Accept-Language:zh-CN,zh;q=0.8");
                WebResponse response = httpWebRequest8.GetResponse();
                result = response.ResponseUri.ToString();
                response.Close();
            }
            return result;
		}
        private void button3_Click(object sender, EventArgs e)
        {
            if (this.textBox2.Text.IndexOf("https://www.lanzous.com/") == -1 || this.textBox2.Text.Length < 2)
            {
                return;
            }
            if (textBox2.Text != "")
            {
            textBox1.Text=(Get_Html(textBox2.Text.Replace("https://www.lanzous.com/", "https://www.lanzous.com/tp/")));
            }

        }

        private void button1_Click(object sender, EventArgs e)
        {
            Clipboard.SetDataObject(textBox1.Text);
        }
    }
}