In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces how to use C # to quickly find out which QQ friend space has blocked you, which has a certain reference value, interested friends can refer to, I hope you can learn a lot after reading this article, let the editor take you to know about it.
First of all, let's enter the QQ group.
After entering, we can see that there are not only all QQ groups, but also all friends of the current qq. We click on the interface of friends, open all friends, copy them directly, and give the rest to regular expressions.
Then we log in to QQ, open this link, http://user.qzone.qq.com/ our own QQ / infocenter, open f12, refresh to find the first interface, and find the cookie that sent the request. Now I don't know how to get cookie by c #. It's better to write crawler or python.
Now we have three preparations, login status of the QQ number, cookie has all the qq friends next look at my complete code
Using System;using System.Collections.Generic;using System.IO;using System.Net;using System.Net.Http;using System.Text;using System.Text.RegularExpressions;namespace ConsoleApp6 {class Program {static void Main (string [] args) {string url = "http://user.qzone.qq.com//infocenter"; string txt ="; StreamReader sr = new StreamReader (@ "qq.txt") / / it contains all qq friends. Write the copied ones directly into while (! sr.EndOfStream) {string str = sr.ReadLine (); txt + = str + "\ n";} sr.Close (); string regex1 = "name:\" (?. *?)\ "," / / get QQ nickname string regex2 = "uin: (?. *?)}"; / / get QQ nickname MatchCollection namelist = Regex.Matches (txt, regex1); MatchCollection qqlist = Regex.Matches (txt, regex2); if (namelist.Count! = qqlist.Count) {Console.WriteLine ("qq nickname does not match the number of QQ numbers!") ; return;} Dictionary dic = new Dictionary (); for (int I = 0; I < namelist.Count; iTunes +) {string qqname = Regex.Match (namelist [I] .Value, regex1). Groups ["name"]. ToString (). Trim () String qqnumber = Regex.Match (qqlist [I] .value, regex2). Groups ["qq"]. ToString (). Trim (); dic.Add (qqname, qqnumber);} string cookie = "#"; / / put the copied cookie inside oh foreach (var item in dic) {url = url.Replace (", item.Value) HttpWebRequest req = (HttpWebRequest) WebRequest.Create (url); req.Method = "GET"; req.Accept = "text/html"; req.AllowAutoRedirect = true; req.Headers.Add ("Encoding", Encoding.UTF8.ToString ()); req.Headers.Add ("cookie", cookie) Req.UserAgent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.71 Safari/537.36"; HttpWebResponse res = (HttpWebResponse) req.GetResponse (); using (StreamReader reader = new StreamReader (res.GetResponseStream () {string html = reader.ReadToEnd () If (! string.IsNullOrEmpty (html)) {string filePath = System.IO.Directory.GetCurrentDirectory () + "\" + item.Key + item.Value + ".txt"; using (StreamWriter sw = new StreamWriter (filePath)) {sw.Write (html) } Console.WriteLine (item.Key + item.Value + "Download OK!\ n");} url = url.Replace (item.Value, ");} Console.WriteLine (" successful, go to the program directory one by one! ") ;}
There are comments that say put the qq number and cookie, and then run
If there is such a sentence in it, alas
Thank you for reading this article carefully. I hope the article "how to use C # to quickly find out which QQ friend spaces block you" is helpful to everyone. At the same time, I also hope you can support us and pay attention to the industry information channel. More related knowledge is waiting for you to learn!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.