Find Jobs
Hire Freelancers

Generate a short bitly url from parameters in a file

$10-30 USD

Completed
Posted almost 6 years ago

$10-30 USD

Paid on delivery
Summary: Given a file with UTM tags, a domain, and a bitly preferred domain, do a script that converts each of these parameters into a long url and request a short url from bitly within the preferred subdomain. Then return a file with the original information plus the results from each request. Technical Requirements: Python 3.7.0 Use Virtual Env and export dependencies when delivering Configuration Parameters: Bitly API Key: The script should have a variable that it receives when being ran representing a Bitly api key. Create a test one for free and use it for your development. Inputs: (Optional) A Column for each UTM Tag that will be added. Columns are: utm_source utm_medium utm_campaign utm_term utm_content (Optional) 6 columns so the name of other three parameters along with their values can also be added to the long url param_1_name param_1_value Same for Param_2 and Param_3 (Required) A url to which the parameters should be attached. (Optional) Bitly’s preferred domain to do shortening (Eg: domain - (optional) the short domain to use; either [login to view URL], [login to view URL], or [login to view URL] or a custom short domain. The default for this parameter is the short domain selected by each user in their bitly account settings. Passing a specific domain via this parameter will override the default settings) Script Functionality: The script should read the input CSV and for each row, construct the domain and the url that will be sent to Bitly. The result of this process will be a long url. The long url should contain the domain, follow by the utm tags with their values, followed by the additional 3 parameters with their values if they exist. Then, the script will go through each long url and do a request to Bitly and retrieve a short url for each using the preferred subdomain. Please read Bitly’s documentation on how to do this request here: [login to view URL] The script should respect the Bitlys quota so it won’t fail. Finally, the script will gather the responses and return a file that contains the same columns as before, but additionally will add the columns stated in the output section. Outputs Long URL: Example: Bitly Data: new_hash - designates if this is the first time this long_url was shortened by this user. The return value will equal 1 the first time a long_url is shortened. It will also then be added to the user history. url - the actual Bitlink that should be used, and is a unique value for the given Bitly account. hash - a bitly hash for long_url which is unique to the given account. global_hash - a bitly hash for long_url which can be used to track aggregate stats across all Bitlinks that point to the same long_url. long_url - an echo back of the longUrl request parameter. This may not always be equal to the URL requested, as some URL normalization may occur (e.g., due to encoding differences, or case differences in the domain). This long_url will always be functionally identical the the request parameter. Error Message: An error message for each url if present. Error Code: An error code that bitly returned if present. Constraints and Requirements: If a UTM parameter is not present, the script should not fail. If the extra parameters 1,2, or 3 are not present, the script should not fail. Any other optional parameter should not make the script fail if not present. If a required parameter is missing, for any of the urls, the script should stop before processing the urls and inform the user. The script should be able to convert at least 1000 URLs continuously. If one of the rows generates an error, the script should continue and an error column should be filled indicating what happened with that row. Example files You will find a file attached called [login to view URL] which will contain a sample file that should be converted. You will find an [login to view URL] which will contain a sample file of the output the script should generate. Unit Tests for functionality
Project ID: 17348886

About the project

2 proposals
Remote project
Active 6 yrs ago

Looking to make some money?

Benefits of bidding on Freelancer

Set your budget and timeframe
Get paid for your work
Outline your proposal
It's free to sign up and bid on jobs
Awarded to:
User Avatar
Hey, I've read through your specification and feel I have a good understanding of your requirements. I've worked on similar scripts in the past and am experienced in Python. I'd be happy to help you with this, drop me a message and we can discuss details. Thanks, Connor
$30 USD in 2 days
5.0 (2 reviews)
2.7
2.7
2 freelancers are bidding on average $28 USD for this job
User Avatar
A very interested task! Though I'm a new freelance here, I'm a Python evangelist with more than 4 years of experience. Clean code, comments, unit tests. Contact me and we will discuss the details if you are interested. Because I am interested! Thank you.
$25 USD in 2 days
0.0 (0 reviews)
0.0
0.0

About the client

Flag of UNITED STATES
Glen Allen, United States
5.0
46
Member since Nov 26, 2014

Client Verification

Thanks! We’ve emailed you a link to claim your free credit.
Something went wrong while sending your email. Please try again.
Registered Users Total Jobs Posted
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Loading preview
Permission granted for Geolocation.
Your login session has expired and you have been logged out. Please log in again.