Crusier wrote:
> Dear All,
>
> I am currently trying to download the stock code. I am using Python
> 3.4 and the code is as follows:
>
> from bs4 import BeautifulSoup
> import requests
> import re
>
> url =
> 'https://www.hkex.com.hk/eng/market/sec_tradinfo/stockcode/eisdeqty.htm'
>
> def web_
On 16Nov2015 15:41, Crusier wrote:
I am currently trying to download the stock code. I am using Python
3.4 and the code is as follows:
[...]
for link in soup.find_all("a"):
stock_code = re.search('/d/d/d/d/d', "1" )
print(stock_code, '', link.text)
[...]
I am trying to r
Dear All,
I am currently trying to download the stock code. I am using Python
3.4 and the code is as follows:
from bs4 import BeautifulSoup
import requests
import re
url = 'https://www.hkex.com.hk/eng/market/sec_tradinfo/stockcode/eisdeqty.htm'
def web_scraper(url):
response = requests.get(