1. Technical Field
The present disclosure relates to electronic devices and methods, and particularly to an electronic device and a method of browsing Web albums on the electronic device.
2. Description of Related Art
Presently, some embedded electronic devices (such as a digital photo frame) can connect to a network. The electronic device also connects to a Web site via the network. Some Web albums are stored in the Web site. Generally, a browser (such as Internet Explorer™) is used to browse the Web albums at the Web site. But the browser has many functions and is not convenient to install the browser in the embedded electronic device.
The disclosure is illustrated by way of example and not by way of limitation in the figures of the accompanying drawings in which like references indicate similar elements. It should be noted that references to “an” or “one” embodiment in this disclosure are not necessarily to the same embodiment, and such references mean at least one.
In general, the word “module,” as used herein, refers to logic embodied in hardware or firmware, or to a collection of software instructions, written in a programming language, such as, for example, Java, C, or assembly. One or more software instructions in the modules may be embedded in firmware, such as an EPROM. It will be appreciated that modules may comprised connected logic units, such as gates and flip-flops, and may comprise programmable units, such as programmable gate arrays or processors. The modules described herein may be implemented as either software and/or hardware modules and may be stored in any type of computer-readable medium or other computer storage device.
Referring to
Referring to
In block S10, the input module inputs a login information. The login information includes a user name and a password.
In block S11, the electronic device connects to the Web site using the Hyper Text Transfer Protocol (HTTP).
In block S12, the electronic device detects whether cookies are obtained from the Web site. If no, skip to S10; If yes, go to S13.
In block S13, the electronic device obtains the valid cookies and connects to the Web site.
Referring to
In block S14, the electronic device connects to the Web albums of the Web site by a Uniform Resource Locator (URL). Each Web album includes a plurality of pictures.
In block S15, a download module of the electronic device downloads a start Hyper Text Markup Language (HTML) Web page of the Web albums from the Web site. The HTML Web file of the Web albums may have many pages.
In block S16, determine whether the first HTML Web page is a last HTML Web page. If no, skip S15; If yes, go on S17.
In block S17, a parser module of the electronic device analyzes the Web file from the first page to the last page.
In block S18, the electronic device reads Web album information from the Web page(s).
In block S19, the user interface displays the Web albums as shown in
Referring to
In block S20, the electronic device connects to one Web album at the URL of the Web album.
In block S21, the download module of the electronic device downloads a start page HTML Web file of the pictures of the one of the Web albums.
In block S22, determine whether the first page Web file is a last page. If no, skip to S21; If yes, go to S23.
In block S23, the parser module of the electronic device parses the Web file from the first page to the last page.
In block S24, the electronic device downloads the pictures information from the Web file.
In block S25, the user interface shows the pictures to the users. The display displays the pictures of the one Web album page by page.
Referring to
In block S26, the parser module stores a regular expression to look for the Web album information and the pictures information according to the Regular Expression rules. “www.TTT.com” is a Regular Expression rule to look for the address of the pictures information in the web file.
In block S27, the parser module finds information satisfying with the Regular Expression rules from the Web file. For example, name information, address information.
In block S28, a storing module of the electronic device stores the Web file as a Comma Separated Value (CSV) file. A separating module of the electronic device separates the name from the address by comma in the CSV file.
While the present disclosure has been illustrated by the description of preferred embodiments thereof, and while the preferred embodiments have been described in considerable detail, it is not intended to restrict or in any way limit the scope of the appended claims to such details. Additional advantages and modifications within the spirit and scope of the present disclosure will readily appear to those skilled in the art. Therefore, the present disclosure is not limited to the specific details and illustrative examples shown and described.
Depending on the embodiment, certain of the steps of methods described may be removed, others may be added, and the sequence of steps may be altered. It is also to be understood that the description and the claims drawn to a method may include some indication in reference to certain steps. However, the indication used is only to be viewed for identification purposes and not as a suggestion as to an order for the steps.
| Number | Date | Country | Kind |
|---|---|---|---|
| 200910310223.7 | Nov 2009 | CN | national |