Multithreading to Scrape Yahoo Finance
问题 I'm running a program to pull some info from Yahoo! Finance. It runs fine as a For loop, however it takes a long time (about 10 minutes for 7,000 inputs) because it has to process each request.get(url) individually (or am I mistaken on the major bottlenecker?) Anyway, I came across multithreading as a potential solution. This is what I have tried: import requests import pprint import threading with open('MFTop30MinusAFew.txt', 'r') as ins: #input file for tickers for line in ins: ticker_array