Quantcast
Channel: Rainmeter Forums
Viewing all articles
Browse latest Browse all 1056

Help: Rainmeter Skins • If anyone is bored, I'll wait :) I'm waiting for professionals

$
0
0
Hello. First of all, our subject is actually very simple, but there are some factors that make it difficult. I came up with half-baked solutions of my own, but maybe I was holding my left ear with my right hand. That's why I can say I couldn't complete the project.
First of all, the most important factor that makes it difficult is that there is no "API" for the web page.
So what is the summary of our topic?
01-) There is a mining site called ravenminer.com.
02-) However, since there is no API support on this site, I cannot make "balance" type requests.
03-) The only thing I can do is follow through the web browser. I prefer to use "api" because there is too much unnecessary information in my opinion.

First let me present to you what I did. Afterwards, I can continue with what I did or listen if you have alternative options.
First, I would like to share with you what I have done, item by item.

01-) "Google Chrome" must be installed on the PC.
02-) "Python" must be installed on the PC.
03-) After installing "google chrome" and "python", we need to install the "pip install import PyPDF2" module on the cmd screen as an administrator.
04-) Now everything is ready. First of all, we open a folder named "ravenminer" in the main directory of the local disk (c) so that our work is easier and all files are easy to find.
05-) We create 1 bat file in the folder. We write the name of the .bat file "webtopdf". We paste the following codes into it.
Codes to be written into .bat; (Adjust its location accordingly wherever Google Chrome is installed. Since I am using a portable, I had to specify a location. Maybe you don't need it either.)

Code:

c:CD/cd GoogleChromePortablecd Appcd Chrome-binchrome.exe --headless --disable-gpu --print-to-pdf="C:\ravenminer\output.pdf" --virtual-time-budget=10000 "https://www.ravenminer.com/zephyr/wallet /ZEPHYR2u8Zg9uwdHHU5oQRG2ZDniADy71M1m7VwA1T9yHHEirSAJffBGx4QhbsurRX9jK6FgWxD7DHwGmxAQHYqZ7ABLifBAiEM1o"
06-) Now we are done with the .bat file. Now it's time for the python code.
07-) Now we create an empty .py file inside the "ravenminer" folder. We name the .py file ravenminer.py. We copy the following codes into it.
python;

Code:

import PyPDF2with open('output.pdf', 'rb') as pdf_file:    pdf_reader = PyPDF2.PdfReader(pdf_file)        pdf_text = "ZEPH"    for page_num in range(len(pdf_reader.pages)):        page = pdf_reader.pages[page_num]        text = page.extract_text()        if "ZEPH" in text.split():            pdf_text += textprint(pdf_text)
08-) Now first we double click on "webtopdf.bat". After clicking it will put a file named "output.pdf" in the "C:\ravenminer" folder. We have now saved the web page as a pdf.
09-) Now it's time to run the Python code. We open the cmd screen as administrator. We write python.py. If everything is correct, the following image should appear in front of us.
sample image;
python sample image;
Image[/url]

The place I want to see on rainmeter.
Image[/url]

10-) So what are the things I've done so far?
1-) We first converted the web page to pdf.
2-) We entered the text in the pdf that we wanted to see into Python. (This is where the problem starts. I just wanted clear pending, but no matter what I write, all the texts come)
3-) I am trying to retrieve the data that says "cleared pending" in the texts we shot with Python using webparser in Rainmeter, but I failed.

As you can see, I went on a long journey because there was no "api". If anyone wants to help or is bored about this issue, I welcome everyone to this thread :)

rainmeter example code;

Code:

[ravenminer]Measure=PluginPlugin=RunCommandProgram=pythonState=HideParameter=ravenminer.pyOutputType=UTF8RegExpSubstitute=1Substitute=(((There is nothing I haven't tried :)))[ravenminerBalance]Meter=StringUpdateDivider=60OnUpdateAction=[!CommandMeasure ravenminer "Run"][ravenminerBalanceText]Meter=StringX=230Y=912FontFace=ConsolasFontColor=255,255,255,255StringStyle=BOLDStringEffect=SHADOWFontEffectColor=0,0,0,50FontSize=15AntiAlias=1MeasureName=ravenminerText= :%1 ZEPHYRDynamicVariables=1

Statistics: Posted by mtchannel — Yesterday, 5:41 pm



Viewing all articles
Browse latest Browse all 1056

Trending Articles