I am trying to extract web data and put it into a database for
analysis.I am just wondering what is the best way to do it and I will
try to dig up information from there.
Please help me how can I kick start this project.
Cheers,
Hank
___
Tutor maillist
Hi Emile,
I have also found that there is something called Scrapy. Please kindly
comment on it. Which one is easier to use compared with Beautiful
Soup?
Thanks in advance.
Cheers,
Hank
___
Tutor maillist - Tutor@python.org
To unsubscribe or change su
Hi,
I am new to programming. I want to know what I should look at if I
want to learn more about Web Praser. I know there is something called
Beautiful Soup but I think it is kind of difficult for me at this
stage.
Thank you
Regards,
Crusier
___
Tutor
Dear All,
I have used the urllib.request and download some of the information from a
site.
I am currently using Python 3.4. My program is as follows:
import urllib.request
response = urllib.request.urlopen('
http://www.hkex.com.hk/eng/ddp/Contract_Details.asp?PId=175')
saveFile = open('HKEX.tx
Hi
I have recently finished reading "Starting out with Python" and I
really want to do some web scraping. Please kindly advise where I can
get more information about BeautifulSoup. It seems that Documentation
is too hard for me.
Furthermore, I have tried to scrap this site but it seems that there
Hi
I am using Python 3.4. I am trying to do some web scraping at this moment.
I got stuck because there is an IndexError: list index out of range if I
put stock_code = (18). My desire output is that the script is able to
detect print out the recent price whether it is up, down or unchanged.
Attac
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(
Dear All,
I am trying to do some web scraping. Attached below is my code:
from bs4 import BeautifulSoup
import requests
#string = str(0175, 0005, 1177)
url = "https://www.etnet.com.hk/www/eng/stocks/realtime/quote.php?code=0175";
def web_scraper(url):
response = requests.get(url)
html
Dear All,
I am using Python 3.4, I tried to scrap the web and eventually put
those data into a database for analysis. While I am using
Beautifulsoup to scrap the web, I encountered 2 problems:
1. Using Beautiful Soup, the webmaster on the other end is using the
same class, so I got a whole list o
Dear All,
I am trying to scrap the following website, however, I have
encountered some problems. As you can see, I am not really familiar
with regex and I hope you can give me some pointers to how to solve
this problem.
I hope I can download all the transaction data into the database.
However, I
simple program (Steven D'Aprano)
>2. Re: Calculation error with a simple program (Jim Gallaher)
>3. Re: Calculation error with a simple program (Todd Purple)
>4. Re: Tutor Digest, Vol 142, Issue 10 (Ken Hammer)
>5. Beautiful Soup (Crusier)
>6. Re: Beautiful So
Hi Python Tutors,
I am currently able to strip down to the string I want. However, I
have problems with the JSON script and I am not sure how to slice it
into a dictionary.
import urllib
import json
import requests
from bs4 import BeautifulSoup
url =
'https://bochk.etnet.com.hk/content/bochkw
Dear All,
I am just wondering if there is any good reference which I can learn how to
program SQLITE using Python
I can not find any book is correlated to Sqlite using Python.
Thank you
Regards,
Hank
___
Tutor maillist - Tutor@python.org
To unsubscr
> Subject: Re: [Tutor] sqlite
> Message-ID:
> Content-Type: text/plain; charset=utf-8
>
> On 03/05/16 10:09, Crusier wrote:
>
> > I am just wondering if there is any good reference which I can learn how
> to
> > program SQLITE using Python
> >
> > I can
y('INSERT INTO stocks VALUES (?)', List)
# Save (commit) the changes
conn.commit()
# We can also close the connection if we are done with it.
# Just be sure any changes have been committed or they will be lost.
conn.close()
The following error has came
r Otten <__pete...@web.de>
> To: tutor@python.org
> Subject: Re: [Tutor] SQLite
> Message-ID:
> Content-Type: text/plain; charset="ISO-8859-1"
>
> Crusier wrote:
>
>> Dear Alan,
>>
>> I have read your web page and try to test thing out on
Dear All,
I am trying to scrape a web site using Beautiful Soup. However, BS
doesn't show any of the data. I am just wondering if it is Javascript
or some other feature which hides all the data.
I have the following questions:
1) Please advise how to scrape the following data from the website:
Hi Walter,
Thank you for taking your time to do all the explanation.
Have a great day.
Cheers,
Hank
On Tue, May 24, 2016 at 10:45 PM, Walter Prins wrote:
> On 24 May 2016 at 15:37, Walter Prins wrote:
>> print(name1.encode(sys.stdout.encoding, "backslashreplace"))
>> #
>
> I
Dear All,
I am currently using:
Python 3.5
Window 7
I have a python script which is used for downloading Real Time Stocks.
Currently, there is over a 1000 stocks in the Portfolio.
If I download the market info during market hours, it would take over
40 minutes to finish downloading all the mark
in to me if the data is hide in CSS Style sheet or
is there any way to retrieve the data listed.
Thank you
Regards,
Crusier
from bs4 import BeautifulSoup
import urllib
import requests
stock_code = ('00939', '0001')
def web_scraper(stock_code):
broker_url =
'
'3.12'
'5.34'
Please kindly explain to me if the data is hide in CSS Style sheet or
is there any way to retrieve the data listed.
Thank you
Regards, Crusier
from bs4 import BeautifulSoup
import urllib
import requests
stock_code = ('00939', '0
I am trying to scrap from the (span class= 'Number'). The code looks
like this on the pages I am scrapping:
99 10.00(-0.1%)
Menu
Max Quantity
100.000
Average Quantity
822
Previous Order
96
Max Price
104
Number of Trades
383
Min Price
59
Total Amou
Hi Alan,
Attached are the two text files (stocklist.txt & stocklist1.txt) which I
want to do a comparison with the content of the file, Basically, I want to
see if there are any new numbers added to the file.
Please comment on the sequence of the file:
1. First, Open up the File No. 1 and put the
Hi,
I am comparing two files, and the program has problem comparing two
files. I am currently using Python 3.3 and Window 7.
Attached is my code:
import difflib
old_file = open('0105-up.txt','r')
file_contentsA = old_file.read()
A = file_contentsA.split(",")
print(A)
print()
new_file = open('
Hi Danny,
Thanks for your suggestion.
The ideal of output of this program is to show if there is any new
number added to the new file.
In other words, the file content of file1 [0001.hk, 0002.hk, 0003.hk,
0004.hk] is comparing with the file content of file2 [0001.hk,
0002.hk, 0003.hk, 0005.hk].
25 matches
Mail list logo