Can you please tell me how to insert links into your c# program | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Can you please tell me how to insert links into your c# program

I am, one might say, a beginner in c# (I am currently on cycles) and I would like to diversify my work somehow. For example, to use some data from the site in the code. For example, a user writes a time or a date or a dollar exchange rate and my program gives him this data. How can this be done and how difficult is it? If anything, I write code in Visual Studio, where everything is displayed on the console.

22nd Jul 2022, 3:28 PM
Иван Литовченко
14 Answers
+ 1
Ok now I get it. You are looking for HttpClient. It's pretty well documented in the Microsoft documentation. And there are a lot of tutorials on google. I'm sure you find the informations now with the hint what exactly you need to search for. Keep in mind that HttpClient is not working on sololearn. You need to try it on your own machine. For a small sample you can take a look at this sololearn code though: https://code.sololearn.com/cKejPNERssf5/?ref=app
22nd Jul 2022, 8:38 PM
Alex
Alex - avatar
22nd Jul 2022, 8:32 PM
Chris Coder
Chris Coder - avatar
+ 2
I've read your question multiple times and honestly still don't know what you are even asking.
22nd Jul 2022, 8:01 PM
Alex
Alex - avatar
+ 2
This link explains it a little better. But it can still confusion depending your knowledge of C#. Save a bookmark or make a code with the links. For when you complete the C# course. https://oxylabs.io/blog/csharp-web-scraping
22nd Jul 2022, 8:44 PM
Chris Coder
Chris Coder - avatar
+ 2
Looks like you'll need to know a little HTML and Javascript as well.
22nd Jul 2022, 8:46 PM
Chris Coder
Chris Coder - avatar
+ 2
Up
23rd Jul 2022, 9:12 AM
Med EDDAHBY
Med EDDAHBY - avatar
+ 1
Alex For example, if i write a link of image or link of website in my code so my code give all information from this link
22nd Jul 2022, 8:29 PM
Иван Литовченко
+ 1
Although it's fun (and sometimes also very convenient for work) I wouldn't start with a webscraper. Have a look at APIs. These can also be accessed by http requests, but return a result in an easy to work with format like json or plain strings. Here is a list of public APIs. (But ignore the ones that need any form of authentication for now) https://github.com/public-apis/public-apis And I'd also suggest to complete the C# course, as understanding of the basics is essential for working with api calls. As Chris Coder already mentioned you should also have a basic knowledge of html if you want to build a webscraper.
22nd Jul 2022, 8:59 PM
Alex
Alex - avatar
0
Chris Coder For example, if i write a link of image or link of website in my code so my code give all information from this link
22nd Jul 2022, 8:29 PM
Иван Литовченко
0
Chris Coder Yes, that's what I meant, thank you. But I don't really understand the information provided on the website you gave me. I think I'm still a long way from web scraping.
22nd Jul 2022, 8:37 PM
Иван Литовченко
0
Alex I looked at the code, it turns out it's not that difficult, thank you very much for the answer.
22nd Jul 2022, 8:42 PM
Иван Литовченко
0
Chris Coder thanks!
22nd Jul 2022, 8:53 PM
Иван Литовченко
0
нужно, чтобы программа ссылки открывать могла и находить что-то на веб-страницах? типа парсинг сайтов?
23rd Jul 2022, 3:30 PM
Patrick
Patrick - avatar
0
C# is one of the popular programming languages that can be used for almost any programming task. we will cover the complete process of web scraping using a C# framework called ScrapySharp and .NET core. https://zenscrape.com/
27th Sep 2022, 5:59 AM
Meenal Aggarwal
Meenal Aggarwal - avatar