python function to generate pdf from url

Completed Posted 5 years ago Paid on delivery
Completed Paid on delivery

I need a python function that recieve 2 parameters and generate a PDF from a url and a XML from url.

prototype:

def generate_pdf(RBR, path_to_download):

#create url

url = "[login to view URL]%s/" % RBR

url_xml = "[login to view URL]%s/v1/xml/opentrials/" % RBR

#TODO

'''

generate pdf from url in english and in portugues

to change manually the language we have to

click on PT or EN at the top right of the screen

this PT and EN link is a trigger for a javascript

save generated PDFs at path_to_download

save xml from url_xml at path_to_download

'''

Adding on function:

def generate_pdf(RBR, path_to_download):
#create url
url = "http://ensaiosclinicos.gov.br/rg/%s/" % RBR
url_xml = "http://ensaiosclinicos.gov.br/rg/%s/v1/xml/opentrials/" % RBR

#TODO
'''
generate pdf from url in english and in portugues
to change manually the language we have to
click on PT or EN at the top right of the screen
this PT and EN link is a trigger for a javascript

save generated PDFs at path_to_download
save xml from url_xml at path_to_download

parse xml to get those informations:

date_registration
created
updated
trial_id
utrn_number
public_title
primary_sponsor_name
primary_sponsor_state
primary_sponsor_city
health_conditions = {"en_text":[], "pt_text":[]}
public_contact_firstname
public_contact_middlename
public_contact_lastname
public_contact_address
public_contact_zip
public_contact_city
public_contact_telephone
public_contact_email
'''

return {"xml": <path_to_download>RBR.xml,

"pt_pdf": <path_to_download>RBR_pt.pdf,
"en_pdf": <path_to_download>RBR_en.pdf,
"date_registration": <value>,
"created": <value>,
"updated": <value>,
"trial_id": <value>,
"utrn_number": <value>,
"public_title": <value>,
"primary_sponsor_name": <value>,
"primary_sponsor_state": <value>,
"primary_sponsor_city": <value>,
"ealth_conditions = {"en_text":[], "pt_text":[]}
"public_contact_firstname": <value>,
"public_contact_middlename": <value>,
"public_contact_lastname": <value>,
"public_contact_address": <value>,
"public_contact_zip": <value>,
"public_contact_city": <value>,
"public_contact_telephone": <value>,
"public_contact_email": <value>,
}


JavaScript Python Software Architecture XML

Project ID: #16621770

About the project

9 proposals Remote project Active 5 years ago

Awarded to:

banalaarunkumar

Hi, I've written several scripts for web scraping and automation. Some of them include, facebook bot to auto comment on newer posts, bot to send email enquiries on housing websites. I've used python for developing t More

$15 USD in 1 day
(6 Reviews)
3.4

9 freelancers are bidding on average $28 for this job

yogeshpawar159

I have checked at website and tested the function successfully. It's already done. Contact for further details.

$25 USD in 1 day
(18 Reviews)
4.8
urstealth

A proposal has not yet been provided

$30 USD in 1 day
(47 Reviews)
5.1
anujism

I am an experience Python developer with more than 9 years of experience. I have developed many projects from scratch. I have very good experience in pandas and numpy.

$25 USD in 1 day
(1 Review)
1.4
Saradiab93

Hi, Mr Do you use any framework? Waiting for your message to start to discuss this task and work Good luck Mr.

$25 USD in 1 day
(1 Review)
0.3
malych

Professional hacker for western country - Israel. can deliver in super short time, and have done this many times before.

$35 USD in 1 day
(0 Reviews)
0.0
jdiheb

I have experience in this kind of projects and i can assure you a quality results with high and cutting edge techniques and technology

$45 USD in 1 day
(0 Reviews)
0.0