Is JavaScript good for scraping?
Are there really any other programming languages better for scraping than JavaScript?
Is JavaScript faster or more efficient than other languages? You'd be surprised by the variety of browsers out there. There is no universal browser or engine, it's as different as OS. The "JavaScript is better" argument is really hard to make though, because it depends on the use-case. For example, do you want to crawl all the sites or do you want to crawl the home pages and ignore everything else? How many pages do you want to scrape? How frequently do you need to download new content? etc. In my case, I was in a situation where I needed to parse some rather large files off a few thousand websites. My language of choice was PHP, and while it was certainly possible, I found that PHP would be prohibitively slow.
In my case, I had a few thousands documents and I wanted to build a crawler with JavaScript so that I could extract the information from the sites in near real-time. In my case, JS allowed me to perform massive queries in near real-time. With PHP, I was stuck with a slower, batch-mode crawler.
Is JavaScript or Python better for web scraping?
If I were to choose between writing my own web scraping library for Python, or using JavaScript in a browser and scripting that browser with a scripting language, what would better? Is it just a matter of taste or are there objective arguments? What will you use the web scraping for? If your goal is just to read data from a website and export it to an appropriate spreadsheet or database, then I suggest sticking with your existing methods. I'm assuming you don't need a real web crawler, but more of a tool that downloads page html and builds a list of table items.
From your comments, I think this is the case - if your goal is not to build a web crawling engine. With that being said, Python is a better choice than JavaScript for web scraping as JavaScript is a client language whereas Python is a server-side language. I do not believe you can "script" a browser running within a web page.
You can easily scrape data from a web page using Python/Django. It's not that hard. The only difficulty may be getting the information you want from a dynamic web page using Python.
Related Answers
How long does web scraping take?
As we know, data web scraping is a process of extracting data fro...
What is web crawling used for?
A web crawler doesn't know what on. What exactly is on the Interne...
What is the best free web scraping tool?
The advent of the internet has changed the way we do everything, in...