Jump to content

Html Parser Help [ File Donwload Help]


Recommended Posts

Posted

what is the nature of the link.., edanna dynamic link aa .... leda static aa... edanna code word or a particular symantics how the link might look like or function??

  • Replies 50
  • Created
  • Last Reply

Top Posters In This Topic

  • charygaru

    22

  • cherlapalli_jailer

    8

  • Spartan

    4

  • galigannarao

    3

Top Posters In This Topic

Posted

[quote name='aamerica_seenu' timestamp='1367597987' post='1303701435']
what is the nature of the link.., edanna dynamic link aa .... leda static aa... edanna code word or a particular symantics how the link might look like or function??
[/quote]

link looks like this

http://www.cms.gov/Research-Statistics-Data-and-Systems/Statistics-Trends-and-Reports/MCRAdvPartDEnrolData/Downloads/2013/[color=#ff0000][b]April[/b][/color]/Monthly-Report-By-Contract-2013-04.zip

aa month variable keeps changing every month and doesnt follow a particular pattern migata antha normal ga ne untadi i mean static apart from the date part at the end before .zip

Posted

[quote name='charygaru' timestamp='1367599777' post='1303701589']
link looks like this

[url="http://www.cms.gov/Research-Statistics-Data-and-Systems/Statistics-Trends-and-Reports/MCRAdvPartDEnrolData/Downloads/2013/"]http://www.cms.gov/R...Downloads/2013/[/url][color=#ff0000][b]April[/b][/color]/Monthly-Report-By-Contract-2013-04.zip

aa month variable keeps changing every month and doesnt follow a particular pattern migata antha normal ga ne untadi i mean static apart from the date part at the end before .zip
[/quote]
java script lo we do like this

since u have the total content

var string = "complete txt" ;
if u r sure of "[url="http://www.cms.gov/Research-Statistics-Data-and-Systems/Statistics-Trends-and-Reports/MCRAdvPartDEnrolData/Downloads/2013/"]http://www.cms.go[/url]v"
var begin = string.indexOf("[url="http://www.cms.gov/Research-Statistics-Data-and-Systems/Statistics-Trends-and-Reports/MCRAdvPartDEnrolData/Downloads/2013/"]http://www.cms.go[/url]v") ;// This needs some trail and error coz u may have lot of HTML tags in the content..


if u know that url ends with .zip ....

then var end - string.indexOf(".zip")


then var my url = string.substring(begin,end) ;

we can do some thing in this line in java script

Posted

[quote name='cherlapalli_jailer' timestamp='1367599995' post='1303701612']
java script lo we do like this

since u have the total content

var string = "complete txt" ;
if u r sure of "[url="http://www.cms.gov/Research-Statistics-Data-and-Systems/Statistics-Trends-and-Reports/MCRAdvPartDEnrolData/Downloads/2013/"]http://www.cms.go[/url]v"
var begin = string.indexOf("[url="http://www.cms.gov/Research-Statistics-Data-and-Systems/Statistics-Trends-and-Reports/MCRAdvPartDEnrolData/Downloads/2013/"]http://www.cms.go[/url]v") ;// This needs some trail and error coz u may have lot of HTML tags in the content..


if u know that url ends with .zip ....

then var end - string.indexOf(".zip")


then var my url = string.substring(begin,end) ;

we can do some thing in this line in java script
[/quote]

exactly....


or use find function to find starting point(href="http://) and ending point(.zip">)

Posted

[quote name='cherlapalli_jailer' timestamp='1367599995' post='1303701612']
java script lo we do like this

since u have the total content

var string = "complete txt" ;
if u r sure of "[url="http://www.cms.gov/Research-Statistics-Data-and-Systems/Statistics-Trends-and-Reports/MCRAdvPartDEnrolData/Downloads/2013/"]http://www.cms.go[/url]v"
var begin = string.indexOf("[url="http://www.cms.gov/Research-Statistics-Data-and-Systems/Statistics-Trends-and-Reports/MCRAdvPartDEnrolData/Downloads/2013/"]http://www.cms.go[/url]v") ;// This needs some trail and error coz u may have lot of HTML tags in the content..


if u know that url ends with .zip ....

then var end - string.indexOf(".zip")


then var my url = string.substring(begin,end) ;

we can do some thing in this line in java script
[/quote]
[quote name='BreakingBad' timestamp='1367600234' post='1303701645']

exactly....


or use find function to find starting point(href="http://) and ending point(.zip">)
[/quote]

nenu website link isthe can you guys give me the code to do what i am intending to ? enudku ante naaku java raadu and etla chestharo kuda no idea?

btw ee end point start point concept ni java la kakunda vere edanna easier way lo cheyachha?

Posted

[quote name='charygaru' timestamp='1367600346' post='1303701661']
nenu website link isthe can you guys give me the code to do what i am intending to ? enudku ante naaku java raadu and etla chestharo kuda no idea?

btw ee end point start point concept ni java la kakunda vere edanna easier way lo cheyachha?
[/quote]
javascript lo kooda cheyyavacchu


java lo class raaya mante .... i can give it quite fast...


mee application back end run avuthe ....java lo better(provided java env vunte)

if ur application web based then go for javascript very simple and easy to use

Posted

web site link kante...

the content u already grabbed iste (coz that is the starting point to write code kada.. hoping .u already pull the content)

i can extract the required URL and give the code back to u

Posted

maa process lo code etla chestham ante

1) we create variables first ( filename , year value , month value , downloadfilename, webpage etc)
2) format the required file name and set variables to values. ( like monthvalue to o5 , year value to 2013, download filename to
monthly-file-contract-(yearvalue)-(monthvalue).zip
3)then we have a logfile which records the downloaded file names previously downloaded.
4)then this month file name ni already download chesukoni record chesi pettukunna log file toh compare chestham
aa log file lo //monthly-file-contract-(2013)-(04).zip// file already downloaded ani untadi kaani ee month 05 kada so checking lo em telusthadi ante monthly-file-contract-(2013)-(05).zip doesnt exist ani telusthadi appudu
5) ee month yokka file name that is monthly-file-contract-(2013)-(05).zip ni "thismonth" ani oka variale lo save chesukuntam.
6)aa file ye paghe lo undo aa webpage link ni download chesukoni "webpage" ani oka variable lo store chesukuntam.
7) aa webpage ane variable lo store ayyi unna webpage lo naaku kavalsina file i mean "monthly-file-contract-(2013)-(05).zip" unda leda ani check chestham. using thismonth = filename ani confition satisfy aithe
8) then download that file ani cheppi aa file ni ekkada nunchi download cheyyalo daani direct link istham enduku ante step 7 lo unnadu just reference matrame not the actual file kabatti.
9) ee download chesetappudu direct link iyyakunda month and year and file name places lo variables ni petti try chestunna kaani everymotnh oka new month name isthundu vaady pattern follow avvakunda adi is what my problem is,.

so now i want to grab the whole thing and use 2013-04 or 2013-05 as my refernece instead of the april or may thing

daanikosam naaku aa link antha variable lo ki grab ayye script kaavaali adi vishayam

Posted

[quote name='cherlapalli_jailer' timestamp='1367600843' post='1303701722']
javascript lo kooda cheyyavacchu


java lo class raaya mante .... i can give it quite fast...


mee application back end run avuthe ....java lo better(provided java env vunte)

if ur application web based then go for javascript very simple and easy to use
[/quote]

naagaarjuna gaaru please email me [email protected] lets talk there then. i am not sure if my tool supports java

Posted

[quote name='cherlapalli_jailer' timestamp='1367600927' post='1303701734']
web site link kante...

the content u already grabbed iste (coz that is the starting point to write code kada.. hoping .u already pull the content)

i can extract the required URL and give the code back to u
[/quote]

content em ledu mayya aa website meeda ki poyi right click and view source anthe nenu chesindi and saved it in a variable.

Posted

[quote name='charygaru' timestamp='1367601208' post='1303701760']
naagaarjuna gaaru please email me [email protected] lets talk there then. i am not sure if my tool supports java
[/quote]
check mail

Posted

http://www.cms.gov/Research-Statistics-Data-and-Systems/Statistics-Trends-and-Reports/MCRAdvPartDEnrolData/Monthly-Enrollment-by-Contract-Items/Enrollment-by-Contract-2013-04.html
[list]
[*][url="/Research-Statistics-Data-and-Systems/Statistics-Trends-and-Reports/MCRAdvPartDEnrolData/Downloads/2013/April/Monthly-Report-By-Contract-2013-04.zip"]Monthly Enrollment by Contract – April 2013 [ZIP, 87KB][/url]
[/list]
thats the file i need to download

view source kodithe line number 489 degata untadi href link

×
×
  • Create New...