تقييم الموضوع :
  • 0 أصوات - بمعدل 0
  • 1
  • 2
  • 3
  • 4
  • 5
[سؤال] ظهور جزء معين من موقع
#1
السلام عليكم ورحمة الله وبركاته
ممكن اخوتى تقولوا لى كيف أظهر فقط جزء معين من صفحة انترنت احددها انا
يعنى مثلا هذه الصفحة اريد ان يظهر فى مشروعى هذا الجزء فقط واخفاء باقى الصفحة
الموقع


ما اريده فقط هذا الجزء الى اخر الصفحة طبعا يعنى اللى فيه الكتابة فقط

الرد }}}
تم الشكر بواسطة: سعود الشامان
#2
PHP كود :
Dim h As String = New Net.WebClient().DownloadString("http://saaid.net/gesah/410.htm")
Dim s As String System.Text.RegularExpressions.Regex.Match(h"(<table width=""98%"" border=""0"" cellspacing=""0"" cellpadding=""7"">).+?(</table>)"System.Text.RegularExpressions.RegexOptions.Singleline).Value
Me
.WebBrowser1.DocumentText 
الرد }}}
تم الشكر بواسطة: ابو روضة , سعود الشامان
#3
(20-10-17, 07:44 PM)a.ahmed كتب :
PHP كود :
Dim h As String = New Net.WebClient().DownloadString("http://saaid.net/gesah/410.htm")
Dim s As String System.Text.RegularExpressions.Regex.Match(h"(<table width=""98%"" border=""0"" cellspacing=""0"" cellpadding=""7"">).+?(</table>)"System.Text.RegularExpressions.RegexOptions.Singleline).Value
Me
.WebBrowser1.DocumentText 

جزاك الله خيرا اخى الكريم احمد...
حضرتك انا الان بجلب صفحات الموقع كلها داخل المشروع
وحضرتك حلتها بالفعل ماشاء الله عليك  لكن على صفحة واحدة فقط وانا بجلب الصفحات داخل ليست بوكس
وعاوز لما اضغط على اسم اى موقع فى الليست بوكس يتم حل حضرتك بعرض جزء من الصفحة
داخل الويب براوزر ولو لم تفهمنى فهذا هو المشروع


الملفات المرفقة
.zip   مقالات صيد الفوائد.zip (الحجم : 343.96 ك ب / التحميلات : 30)
الرد }}}
تم الشكر بواسطة: سعود الشامان , سعود الشامان
#4
(20-10-17, 09:37 PM)a.ahmed كتب : Remove WebBrowser1
Remove ListBox2
Remove Button1
Remove Label1

PHP كود :
Public Class Form1

    Dim dic 
As New Dictionary(Of StringString)

 
   Private Sub ListBox1_SelectedIndexChanged(ByVal sender As ObjectByVal e As EventArgsHandles ListBox1.SelectedIndexChanged
        Dim h 
As String = New Net.WebClient().DownloadString(dic(sender.text))
 
       Dim s As String System.Text.RegularExpressions.Regex.Match(h"(<table width=""98%"" border=""0"" cellspacing=""0"" cellpadding=""\d+"">).+?(</table>)"System.Text.RegularExpressions.RegexOptions.Singleline).Value
        Me
.WebBrowser2.DocumentText s
    End Sub

    Private Sub Form1_Load
(ByVal sender As ObjectByVal e As EventArgsHandles MyBase.Load
        Dim h 
As String = New Net.WebClient().DownloadString("http://www.saaid.net/mohamed/m.htm")
 
       Dim matches As System.Text.RegularExpressions.MatchCollection System.Text.RegularExpressions.Regex.Matches(h"<font size=""\d+""><a href=""\d+.htm""><font color="".+"">.+[\r\n]?.+</font></a></font></td>")
 
       For Each m As System.Text.RegularExpressions.Match In matches
            Dim v 
As String m.Value.Replace(vbNewLine" ")
 
           Dim l As String "http://www.saaid.net/mohamed/" System.Text.RegularExpressions.Regex.Match(v"(?<=<font size=""4""><a href="")\d+\.htm?(?="">)").Value
            Dim t 
As String Net.WebUtility.HtmlDecode(System.Text.RegularExpressions.Regex.Replace(v"<.*?>"""))
 
           dic.Add(tl)
 
           ListBox1.Items.Add(t)
 
       Next
    End Sub

End 
Class 



ربنا يسعدك اخى الكريم احمد ويبارك بعمرك فعلا نجحت اخى...


زادك الله علما نافعاً
الرد }}}
تم الشكر بواسطة: سعود الشامان
#5
Remove WebBrowser1
Remove ListBox2
Remove Button1
Remove Label1

PHP كود :
Public Class Form1

    Dim dic 
As New Dictionary(Of StringString)

 
   Private Sub ListBox1_SelectedIndexChanged(ByVal sender As ObjectByVal e As EventArgsHandles ListBox1.SelectedIndexChanged
        Dim h 
As String = New Net.WebClient().DownloadString(dic(sender.text))
 
       Dim s As String System.Text.RegularExpressions.Regex.Match(h"(<table width=""98%"" border=""0"" cellspacing=""0"" cellpadding=""\d+"">).+?(</table>)"System.Text.RegularExpressions.RegexOptions.Singleline).Value
        Me
.WebBrowser2.DocumentText s
    End Sub

    Private Sub Form1_Load
(ByVal sender As ObjectByVal e As EventArgsHandles MyBase.Load
        Dim h 
As String = New Net.WebClient().DownloadString("http://www.saaid.net/mohamed/m.htm")
 
       Dim matches As System.Text.RegularExpressions.MatchCollection System.Text.RegularExpressions.Regex.Matches(h"<font size=""\d+""><a href=""\d+.htm""><font color="".+"">.+[\r\n]?.+</font></a></font></td>")
 
       For Each m As System.Text.RegularExpressions.Match In matches
            Dim v 
As String m.Value.Replace(vbLf" ")
 
           Dim l As String "http://www.saaid.net/mohamed/" System.Text.RegularExpressions.Regex.Match(v"(?<=<font size=""4""><a href="")\d+\.htm?(?="">)").Value
            Dim t 
As String Net.WebUtility.HtmlDecode(System.Text.RegularExpressions.Regex.Replace(v"<.*?>"""))
 
           dic.Add(tl)
 
           ListBox1.Items.Add(t)
 
       Next
    End Sub

End 
Class 

    Updated
الرد }}}
تم الشكر بواسطة: ابو روضة , سعود الشامان


المواضيع المحتمل أن تكون متشابهة .
الموضوع : الكاتب الردود : المشاهدات : آخر رد
  تعديل طول حقل معين في جميع جداول القاعدة atefkhalf2004 1 97 09-03-24, 03:17 AM
آخر رد: atefkhalf2004
  [VB.NET] مشكلة ظهور textbox بعد حذفه من الفورم مبرمج صغير 1 1 221 27-01-24, 02:04 AM
آخر رد: مبرمج صغير 1
  [VB.NET] ظهور التاريخ غير مرتب بالأقدم في datagridview مبرمج صغير 1 4 304 26-01-24, 03:41 PM
آخر رد: atefkhalf2004
  اختبار الفاتورة في موقع يطلع خطأ thepast 0 208 21-12-23, 12:06 PM
آخر رد: thepast
Lightbulb [VB.NET] إطهار الصورة بمقاس معين في DataGridView أبو خالد الشكري 2 323 14-12-23, 03:01 PM
آخر رد: أبو خالد الشكري
  [سؤال] كيفية تشغيل ملف باتش دون ظهور "نافذةالـ Consol "؟ AmeenRashed 9 672 14-12-23, 12:07 PM
آخر رد: asmarsou
  [VB.NET] كيف يمكن إخفاء ظهور الشاشة السوداء فى الـــ console AmeenRashed 2 316 15-11-23, 03:51 PM
آخر رد: justforit
  تحديد موقع ملف user.config واعدة توجيهه لموقع آخر Mohammed Nafa 3 439 07-11-23, 10:12 PM
آخر رد: Mohammed Nafa
  كيف اجعل البرنامج في بداية الشهر ينفذ حدث معين بالاصح اريد البرنامج في تاريخ واحد من Adel27213 3 484 05-11-23, 01:45 AM
آخر رد: justforit
  كيفية جمع قيمة على تاريخ معين واستنتاج تاريخ أخر Ahmed.vb 1 317 02-11-23, 03:52 AM
آخر رد: Taha Okla

التنقل السريع :


يقوم بقرائة الموضوع: بالاضافة الى ( 1 ) ضيف كريم