Can we able to use a C language for web scraping? | Sololearn: Learn to code for FREE!
Nouvelle formation ! Tous les codeurs devraient apprendre l'IA générative !
Essayez une leçon gratuite
+ 3

Can we able to use a C language for web scraping?

If yes means, please tell me how can I implement it.... And Also tell me where can I learn webscraping In C I also searched it on Google....It shows only about webscraping in python.... It doesn't shows details about webscraping in C

2nd Nov 2020, 1:57 PM
Yogeshwaran P
Yogeshwaran P - avatar
6 Réponses
+ 1
you’ll need: 1)http client(with SSL) 2)regular expresion and/or json parser and/or html parser 3) understanding of 2) i.e. how to effectively use them (regex...) to grab target data. I once wrote an instagram downloader in C++. I used my own http client, regex (C++), and a json parser. To make http client you need to have the understanding of low level socket programming. For SSL support I used openssl. As earlier answerer mentioned, it’s good to use already available options then reinventing the wheel. But if you want to do from scratch, then you have to write every single libraries I mentioned above from scratch. Good luck. N.B. I forgot to mention if you use C then you need to have your own containers (vector, list...) and good understanding of dynamic memory management.
2nd Nov 2020, 4:57 PM
Flash
+ 2
Thank you Coder Kitten for yours detailed explanations...😊. But I want to learn,how to scrap a web in C from its scratch..... Without simply using Libraries.... If you find any website for learning webscraping in C... then Please share it with me...
2nd Nov 2020, 2:38 PM
Yogeshwaran P
Yogeshwaran P - avatar
+ 2
Thank you very much Coder Kitten.....😊.
2nd Nov 2020, 2:46 PM
Yogeshwaran P
Yogeshwaran P - avatar
+ 1
Thank you Flash 😊. But I don't why I need to use vector in web scraping? while using C please tell me, because I am newbie in webscraping.....
3rd Nov 2020, 1:10 AM
Yogeshwaran P
Yogeshwaran P - avatar
+ 1
Yogeshwaran well, you said you want to write everything from scratch. if you want to write an http client how are you gonna store data? C fixed array? Everything is gonna be out of control soon if you follow this way. About web scraping: let’s say you want to scrap 100 http urls. where are you gonna store those? raw array won’t cut out for this when you won’t even know the length of data beforehand. I’d suggest something like C++ or Rust if you want to use any system language for web scraping. Or find good open source libraries for C.
3rd Nov 2020, 1:42 AM
Flash
+ 1
Now I understood that correct way by you......😁 Thanks Flash for yours concern..... And for yours Better explanation.....😊
3rd Nov 2020, 3:51 AM
Yogeshwaran P
Yogeshwaran P - avatar