Results 1 to 6 of 6
Thread: source code-
Hybrid View
-
19th April 2014 18:41 #1Registered User
Join Date: Dec:2012
Location: ,
Posts: 24
source code-
. .
http://www.dnes.bg/tv.php
. source code- ?
- :
19.04 -
20:00 -
21:00 -
19:00 - H
..
, copy-paste 1 . ?
.Last edited by vaslence; 19th April 2014 at 18:59.
-
19th April 2014 20:53 #2
T source-, html parser, html :
python Beautiful Soup :
:Code:#!/usr/bin/python from bs4 import BeautifulSoup import sys f = open(sys.argv[1],"r") html = f.read() parsed_html = BeautifulSoup(html) tbl=parsed_html.find_all('table')[1] for sp in tbl.find_all(True): if sp.name=="span": print "" print "<<<<< "+sp.text+" >>>>>>" if sp.name=="div": if sp.has_key('class'): if sp["class"][0]== "info" or sp["class"][0]=="ttl": print sp.text
-human friendly , , ( , )<<<<< 1 >>>>>>
:
19:45
, !
20:00
20:30
<<<<< bTV >>>>>>
:
bTV -
19:30
bTV -
20:00
" " -
22:00
" 3" - ,, , 1995 ., :
<<<<< Nova TV >>>>>>
:
-
19:30
20:00
" " - . , , ,...
22:10
" " -
, . , table span- div- class info ttl.. HWBG !
-
19th April 2014 21:05 #3Registered User
Join Date: Dec:2012
Location: ,
Posts: 24
, . ( " "), .

Python Beautiful Soup, , ?
, ?
, ?
.
EDIT: Python, source code- , ?Last edited by vaslence; 19th April 2014 at 22:08.
-
19th April 2014 23:34 #4
, .
" " - , .
, .ASRock B550M Pro 4; Ryzen R5 3600; 2x16 GiB G.SKILL Aegis 3200; 1TB Samsung QVO 960 + 3TB Seagate IronWolf; Zalman Z1
-
29th April 2014 16:07 #5Registered User
Join Date: Dec:2012
Location: ,
Posts: 24
, ?
-
5th May 2014 17:42 #6Registered User
Join Date: Jan:2014
Location: .bg
Posts: 462




Reply With Quote

07.05.23 ., 16:02 in PC