I want scrape Web contents for my website, so what to use? And any ideas where to start | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

I want scrape Web contents for my website, so what to use? And any ideas where to start

If I want scrape a links and titles from a blog what code should I use , as of now I'm interested in php scraping or curl

6th Jun 2017, 8:25 AM
Thippesh Abhilash
Thippesh Abhilash - avatar
5 Answers
+ 3
try "beautifulsoup" https://pypi.python.org/pypi/beautifulsoup4
6th Jun 2017, 1:41 PM
seamiki
seamiki - avatar
+ 3
you need to run the script serverside and store the result of your scaping in a file that could be accessed to update content in sections of your website. If you are using an online hosting service, pyton functinality may be limited. If your server is on your pc you have no limits.
6th Jun 2017, 6:21 PM
seamiki
seamiki - avatar
+ 3
To run a python script from a webpage you can call the script with an html form the same way you'd call a php script. search python CGI (common gateway interface) for more details on making your script executable, telling the server where to find the python interpreter and so on. This is a good starting point https://wiki.python.org/moin/CgiScripts
6th Jun 2017, 6:40 PM
seamiki
seamiki - avatar
+ 1
Thank you Seamiki, Yes I tried bs4 on my pc but how to use it on my website, I can extract to CSV or json locally how to use and show on my website
6th Jun 2017, 5:43 PM
Thippesh Abhilash
Thippesh Abhilash - avatar
+ 1
Thank you lot dear will give try running local server or cgi, and once again thank you, got an idea now
7th Jun 2017, 11:16 AM
Thippesh Abhilash
Thippesh Abhilash - avatar