maestro00 / htmlparse-scraper Goto Github PK
View Code? Open in Web Editor NEWE-Bay Advanced Search Scrapper
E-Bay Advanced Search Scrapper
I am trying to get some datas from https://www.bddk.org.tr/BultenHaftalik this page.(You can put /en to see in English) (Excuse about my English bad)
But i need to Post __RequestVerificationToken with some parameters.
I created a simple GET function to get cookie value and direct it to a Method which provides the Post parameters but i'm getting error page in my HaftalikTaylan_post.Response as <title>Runtime Error</title> this HTML.
On the Top:
` Private HaftalikTaylan As State = New State With {.Url = "http://www.bddk.org.tr/BultenHaftalik/"}
Private __RequestVerificationToken As String = String.Empty
Private HaftalikTaylan_post As State = New State With {.Url = "http://www.bddk.org.tr/BultenHaftalik/tr/Home/KiyaslamaJsonGetir/"}
`
And the methods are:
` Private Sub Deneme()
Dim client As RestSharp.RestClient = New RestSharp.RestClient(Me.HaftalikTaylan.Url)
Me.HaftalikTaylan.Request = New RestSharp.RestRequest(RestSharp.Method.GET) With {.Timeout = 5 * 60 * 1000}
Me.HaftalikTaylan.Response = client.Execute(Me.HaftalikTaylan.Request)
If Me.HaftalikTaylan.Response.Cookies.Count > 0 Then
For i As Integer = 0 To Me.HaftalikTaylan.Response.Cookies.Count - 1
If Me.HaftalikTaylan.Response.Cookies(i).Name.Contains("__RequestVerificationToken_L0J1bHRlbkhhZnRhbGlr0") Then
__RequestVerificationToken = Me.HaftalikTaylan.Response.Cookies(i).Value
End If
Next
End If
Me.Deneme_post(__RequestVerificationToken)
End Sub
Private Sub Deneme_post(__RequestVerificationToken As String)
Dim client As RestSharp.RestClient = New RestSharp.RestClient(Me.HaftalikTaylan_post.Url)
Me.HaftalikTaylan_post.Request = New RestSharp.RestRequest(RestSharp.Method.POST) With {.Timeout = 5 * 60 * 1000}
Me.HaftalikTaylan_post.Request.AddHeader("cahce-control", "no-cache")
Me.HaftalikTaylan_post.Request.AddHeader("content-type", "application/x-www-form-urlencoded")
Dim parameterString As String = "__RequestVerificationToken=" & __RequestVerificationToken & "&dil=tr&tarih=8.3.2019&id=154¶birimi=TL&sutun=154&tarafKodu=10001&gun=90"
Me.HaftalikTaylan_post.Request.AddParameter("application/x-www-form-urlencoded", parameterString, RestSharp.ParameterType.RequestBody)
Me.HaftalikTaylan_post.Response = client.Execute(Me.HaftalikTaylan_post.Request)
End Sub`
And my response content's is just:
{"Baslik":"Grafik Başlığı","XEkseni":[],"YEkseni":[]}
-Thank you
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.