02-11-13, 09:46 PM
(02-11-13, 07:13 PM)محمد كتب : كلام كبير
ارجوا منك اخي علي الحداد شرح الاكواد
لاسيما وهي اكواد قيمة جدا
وتقبل شكري
بخصوص أول جزء
كود :
Dim req As HttpWebRequest = HttpWebRequest.Create(wikiLink)
Dim res As HttpWebResponse = req.GetResponse()
Dim SR As New StreamReader(res.GetResponseStream())
Dim page As String = SR.ReadToEnd()ثم بحثت في هذا النص عن المعلومات التي أريدها (الشركة و تاريخ الإنتاج) كيف تأتي في التنسيق
لأستخلصها عن طريق هذا الكود
كود :
Dim manufacturer As String = page.Substring(page.IndexOf("Manufacturer</th>") + 17)
manufacturer = manufacturer.Substring(manufacturer.IndexOf("title=""") + 7)
manufacturer = manufacturer.Substring(0, manufacturer.IndexOf(""""))
Dim production As String = page.Substring(page.IndexOf("Production</th>") + 15)
production = production.Substring(production.IndexOf(">") + 1)
production = production.Substring(0, production.IndexOf("</"))ثم يتم عرضها في الـLabels بهذا الكود
كود :
lblManufacturer.Text = "Manufacturer: " & manufacturer
lblProduction.Text = "Production: " & production

