extract URLs of Strings?
-
Hello everyone! Iam coding a little tool in C# which could be used as image downloader from websites. Via httpget I retrieve the pagecontent of the entire website and put all that into a textbox objekt (like a console) now I want to extract any "http:\\xxxxxxxxxxxxxxxxx.jpg" links and put them into a new string. But I have no idea. can you help me? :doh:
-
Hello everyone! Iam coding a little tool in C# which could be used as image downloader from websites. Via httpget I retrieve the pagecontent of the entire website and put all that into a textbox objekt (like a console) now I want to extract any "http:\\xxxxxxxxxxxxxxxxx.jpg" links and put them into a new string. But I have no idea. can you help me? :doh:
regular expressions perhaps? you can do pattern matching to get the urls and such. im sure that there is a class out there that will download the actual source of a given webpage, you can then parse that source string to retrieve the href to jpg files. keep in mind that a lot of people are ussing CSS and there might not be any direct links in the source document, you might have to go to the CSS files to find jpg urls...hope thats what you were looking for.
-
Hello everyone! Iam coding a little tool in C# which could be used as image downloader from websites. Via httpget I retrieve the pagecontent of the entire website and put all that into a textbox objekt (like a console) now I want to extract any "http:\\xxxxxxxxxxxxxxxxx.jpg" links and put them into a new string. But I have no idea. can you help me? :doh:
ger_creal wrote:
I want to extract any "http:\\xxxxxxxxxxxxxxxxx.jpg" links and put them into a new string
Stay tuned for an article (that I'll be uploading very shortly) that will let you do this with ease! /ravi My new year's resolution: 2048 x 1536 Home | Music | Articles | Freeware | Trips ravib(at)ravib(dot)com
-
ger_creal wrote:
I want to extract any "http:\\xxxxxxxxxxxxxxxxx.jpg" links and put them into a new string
Stay tuned for an article (that I'll be uploading very shortly) that will let you do this with ease! /ravi My new year's resolution: 2048 x 1536 Home | Music | Articles | Freeware | Trips ravib(at)ravib(dot)com
-
regular expressions perhaps? you can do pattern matching to get the urls and such. im sure that there is a class out there that will download the actual source of a given webpage, you can then parse that source string to retrieve the href to jpg files. keep in mind that a lot of people are ussing CSS and there might not be any direct links in the source document, you might have to go to the CSS files to find jpg urls...hope thats what you were looking for.
Yes thats true. but css is not the problem. the problem is javascript. to download images in javascript links i have to find out the name of the image file (eg: xxxxx.jpg) and then i have to build up a new string containing filename and url. steps ----- 1. find out jpg filenames 2. build a new string containing filenames and url 3. filter big images (to avoid thumb downloading) 4. perhaps modify filenames (eg: xxxxxxx_thumb.jpg ----> xxxxxx.jpg) 5. download stuff