Hiring freelancer: Cryptocurrency Trading Technical Analysis (Scraping from another website) | Sololearn: Learn to code for FREE!

+68

Hiring freelancer: Cryptocurrency Trading Technical Analysis (Scraping from another website)

Scraping Variables: 1. Realtime lowest & highest prices From https://vip.bitcoin.co.id/ 2. Realtime 7 days average change From https://coinmarketcap.com/all/views/all/ The combine is scraping from two different sites in one page. Feel free to use JSON, PHP or Python. Logs and Credits: 1. Abdelfattah Toulaoui https://www.sololearn.com/Profile/3901160 Python https://code.sololearn.com/cgPQdK22g8Na/?ref=app#py 2. Calvin https://www.sololearn.com/Profile/4354920 JSON a. Scraping from bitcoin.co.id https://code.sololearn.com/W9Guej5bPSKK/?ref=app b. Scraping last week change from coinmarketcap.com https://code.sololearn.com/WIKmHtaVrKZN/?ref=app Showing the current prices (lowest & highest) and last week change percentage of different pages. Please, upvote their codes to appreciate their effort.

9/26/2017 10:05:25 PM

Adi Pratama, S.Kom.

11 Answers

New Answer

+6

I'm not CC expert so I'm not sure if I got the right API address https://code.sololearn.com/cgPQdK22g8Na/?ref=app But this should work with most apis Edit: Modified the script so that it enters an infinit loop updating the values every few seconds

+10

Here you go... https://code.sololearn.com/WIKmHtaVrKZN/?ref=app

+8

@Adi Pratama I think this is the trading price data you are looking for... https://code.sololearn.com/W9Guej5bPSKK/?ref=app

+6

Where Ajay The Freelancer :P

+6

@Adi wrote: << what's the purpose of sys.stdout.write('\x1b[1A'*12) inside ur code? >> sys.stdout.write is kind of low level print(): https://stackoverflow.com/questions/3263672/python-the-difference-between-sys-stdout-write-and-print ... and start of string outputed is called ANSI escape sequence, which are command to handle text output, such as change color, cursor position... in this case, the command will move the cursor up one row 12 times, by repeating 12 times the command to move up cursor one row (could have been written '\33[12A' -- '\33' or '\x1b' is same char but in octal or in hexadecimal representation, A is the command itself, 12 is parameter): https://en.m.wikipedia.org/wiki/ANSI_escape_code#Sequence_elements

+5

https://code.sololearn.com/WN3ltEZq5wGW/?ref=app

+3

Looks interesting

+3

yeah, try it on a computer because it's importing a few big modules and CodePlayground doesn't like it

+2

I have a habbit of using 4 spaces and python recognizes spaces and tabs differently so make sure to use the right ones. PS: I see you're using notepad++ and it detects the problem and shows different blocks besides the line numbers

+1

@adi the litecoin code is not working because the break is in the wrong block, it should be under the if not the while

-4

show de bola