Tom Swift and His Electric Runabout
He recharged his electric car's battery by tying into a trolley line. And this was back in 1910. Free online from various sources. For a quick summary,
https://en.wikipedia.org/wiki/Tom_Swift_and_His_Electric_Runabout
Wow, I had all the Tom Swift books back in the 60’s, I recall sneaking them up to my bedroom and read them all night as I was dead tired the next day in school LOL. Haven’t heard of them since.