Every city of the first class may by ordinance authorize the location, construction, and operation of railroads in, along, over, and across any highway, street, alley, or public place in the city for such term of years and upon such conditions as the city council may by ordinance prescribe notwithstanding any provisions of the city charter limiting the length of terms of franchises or requiring franchises to contain a provision granting the city the right to appropriate by purchase the property of any corporation receiving a franchise, license, privilege, or authority: PROVIDED, That this does not apply to street railroads nor to railroads operated in connection with street railroads in and along the streets of such city.