• ¡Welcome to Square Theme!
  • This news are in header template.
  • Please ignore this message.
مهمان عزیز خوش‌آمدید. ورود عضــویت


امتیاز موضوع:
  • 5 رای - 2.6 میانگین
  • 1
  • 2
  • 3
  • 4
  • 5
Title: سورس بدست اوردن عکس اواتار یوزر در تویتر
حالت موضوعی
#1
کد:
string getTwitterUserImage(string userUrl)
        {
            try
            {
                // The initial Twitter URL
                string twitterUrl = userUrl;
                HttpWebRequest myRequest = (HttpWebRequest)HttpWebRequest.Create(twitterUrl);
                myRequest.Method = "GET";
                HttpWebResponse myResponse = (HttpWebResponse)myRequest.GetResponse();
                StreamReader myPageSource = new StreamReader(myResponse.GetResponseStream());
                string source = myPageSource.ReadToEnd();
                myResponse.Close();

                // The set of selections that will be
                // used to select the needed part from
                // the HTML source of the user page.
                int selectionA = 0;
                int selectionB = 0;
                int selectionC = 0;

                selectionA = source.IndexOf("<img alt=\"\" border=\"0\" height=\"73\" id=\"profile-image\"");
                selectionB = source.IndexOf("src=", selectionA);
                selectionC = source.IndexOf("valign=\"middle\"", selectionB + 4);

                // Extract the image URL from the source selection.
                string fullUrl = source.Substring(selectionB + 5, selectionC - 7 - selectionB);
                return fullUrl;
            }
            catch (Exception exc)
            {
                return null;
            }
}
گروه دور همی پارسی کدرز
https://t.me/joinchat/GxVRww3ykLynHFsdCvb7eg
 
پاسخ
  


موضوعات مشابه ...
موضوع نویسنده پاسخ بازدید آخرین ارسال
  سورس کد تبدیل عکس رنگی به سیاه سفید (سی شارپ) Amin_Mansouri 1 5,579 10-08-2022، 08:06 PM
آخرین ارسال: sonusood
  سورس کد تبدیل عکس به ایکون ( سی شارپ ) Amin_Mansouri 1 3,024 10-08-2022، 07:37 PM
آخرین ارسال: sonusood
  سورس کد تغییر دادن سایز عکس ( سی شارپ) Amin_Mansouri 1 5,478 10-08-2022، 07:08 PM
آخرین ارسال: sonusood
  سورس کد ساخت فایل pdf (سی شارپ) Amin_Mansouri 3 9,958 07-01-2017، 10:05 AM
آخرین ارسال: 7seo
  سورس کد الگوریتم رمزنگاری تصویر زهرا ترکاشوند 3 7,625 05-17-2016، 01:41 PM
آخرین ارسال: mehdisadeghi
  سورس کد ifc saraj00n 1 2,290 05-13-2016، 01:46 PM
آخرین ارسال: saraj00n
  بدست اوردن میزارن کنتراست عکس saraj00n 1 2,407 05-01-2016، 05:32 PM
آخرین ارسال: Amin_Mansouri
  سورس کد اضافه ,ویرایش,حذف,جستجو در دیتابیس(سی شارپ) Amin_Mansouri 6 21,392 12-09-2015، 08:17 AM
آخرین ارسال: Amin_Mansouri
  فروش سورس کد کتابساز اندروید دانشجو omid_student 1 3,570 08-12-2014، 11:00 AM
آخرین ارسال: Amin_Mansouri
  سورس کد تبدیل متن به صدا (سی شارپ) Amin_Mansouri 7 12,810 12-18-2013، 12:51 PM
آخرین ارسال: sal

پرش به انجمن:


Browsing: 1 مهمان