Stock news url not work and fix

Stock news url not work and fix

Welcome to my blog. Help yourself.
----- perrin

2018-09-26 21:13


I found that the urls to the news of some stocks are not working. After I checked the detail, the 'http://' prefix was repeated. Oops, some changes in the data source  caused  my bugs.

I just use 'rfind' to get the first '//' and remove all characters before it, including the splitter '//'.

So, test is very important to find bugs and keep the availability of products, especially seft-test and reporting.

To be careful when dealing with data from outside and make the code stronger.

 


Commenter Name
Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin. Cras purus odio, vestibulum in vulputate at, tempus viverra turpis. Fusce condimentum nunc ac nisi vulputate fringilla. Donec lacinia congue felis in faucibus.
Commenter Name
Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin. Cras purus odio, vestibulum in vulputate at, tempus viverra turpis. Fusce condimentum nunc ac nisi vulputate fringilla. Donec lacinia congue felis in faucibus.
Commenter Name
Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin. Cras purus odio, vestibulum in vulputate at, tempus viverra turpis. Fusce condimentum nunc ac nisi vulputate fringilla. Donec lacinia congue felis in faucibus.
Search
Page view info
{'ip': '18.204.227.250', 'lat_lon': (39.0481, -77.4728), 'city': 'Ashburn', 'pv': 57914, 'cur_pv': 73, 'cur_daily_pv': 1, 'ur_pv': 1, 'ur_cur_all': 1, 'ur_today_all': 1, 'ur_today_cur': 1, 'daily_pv': 137, 'daily_ip': 79, 'whole_ip': 9790, 'ip_delta': 4}
AMap
Baidu Map