oc.at as a filesystem :O

Seite 1 von 3 - Forum: Coding Stuff auf overclockers.at

URL: https://www.overclockers.at/coding-stuff/oc-at-as-a-filesystem-o_248122/page_1 - zur Vollversion wechseln!


issue schrieb am 26.01.2017 um 21:20

sers

Ich wollt mir mal fuse anschauen und brauchte einen 'grund'; drum gibts jetzt ocatfs!

python3 mit fusepy und beautifulsoup zum oc.at scrapen

Features:

Todo:
Screencast dazu:
https://asciinema.org/a/daxkb7zsi2zlz12j27z7ekd2g
besserer output:
https://asciinema.org/a/a810kmc9ybu6g42txahpa6ftj
Source kommt spaeter noch

edit: https://github.com/IsSuEat/ocatfs


deftenski schrieb am 26.01.2017 um 21:29

just cool!


davebastard schrieb am 26.01.2017 um 21:32

nice :D


Lord Wyrm schrieb am 26.01.2017 um 22:28

Find ich supernice :D


issue schrieb am 26.01.2017 um 22:52

danke :)
geil waers wenn man sich mit cookie einloggen und mit

Code:
echo "test message" >> oc-at-as-a-filesystem-o_248122
posten koennt ;)


wergor schrieb am 26.01.2017 um 22:54

geil :D


-=Willi=- schrieb am 27.01.2017 um 08:29

Nice!

5 Sterne von mir und einer auf GitHub :D.


semteX schrieb am 27.01.2017 um 08:59

das is ehrlich eines der wunderbarsten sachn die ich die letzten jahre sehen durfte.


böhmi schrieb am 27.01.2017 um 09:14

Sehr geil!

Mir fällt jetzt keine sinnvolle Anwendung davon ein, aber sehr geil! :D


issue schrieb am 27.01.2017 um 09:25

Is eher for the lulz als irgendwie sinnvoll.
Aber es is arguably alles besser wenns ein filesystem is ;)


böhmi schrieb am 27.01.2017 um 09:28

Das war mir schon klar, gibt ja viele sinnlose Dinge, die trotzdem geil sind :D


rad1oactive schrieb am 27.01.2017 um 09:32

;)

glory_of_satan_by_ltdimitri-d6fp5cq_220013.jpg


Hansmaulwurf schrieb am 27.01.2017 um 09:42

Zitat von böhmi
Sehr geil!
!!


GrandAdmiralThrawn schrieb am 27.01.2017 um 11:32

Ich wollts grade auf CentOS 6.8 Linux und FreeBSD 11.0 UNIX testen, aber no luck.. Kann leider selber kein Python, aber hier is, was er ausspuckt:

CentOS 6.8 Linux x86_64:

Code:
$ ./test_ocatfs.py
./test_ocatfs.py 
./test_ocatfs.py: line 1: from: command not found
./test_ocatfs.py: line 3: syntax error near unexpected token `('
./test_ocatfs.py: line 3: `def test_get_threads():'

$ ./ocatfs.py 
./ocatfs.py: line 4: from: command not found
./ocatfs.py: line 7: from: command not found
./ocatfs.py: line 11: syntax error near unexpected token `('
./ocatfs.py: line 11: `class Thread(object):'

$ python --version
Python 2.6.6
FreeBSD 11.0 UNIX x86_64:

Code:
$ ./test_ocatfs.py
./test_ocatfs.py: line 3: syntax error near unexpected token `(´
./test_ocatfs.py: line 3: `def test_get_threads():´

$ ./ocatfs.py
./ocatfs.py: line 11: syntax error near unexpected token `(´
./ocatfs.py: line 11: `class Thread(object):´

$ python --version
Python 2.7.13

$ python3.4 ./test_ocatfs.py

Traceback (most recent call last):
  File "./test_ocatfs.py", line 1, in <module>
    from ocatfs import ocatfs
  File "/usr/home/thrawn/src/ocatfs/ocatfs/ocatfs/ocatfs.py", line 5, in <module>
    import fuse
ImportError: No module named 'fuse'

$ kldstat | grep fuse
11	1 0xffffffff8244c000	fuse.ko

$ echo "help('modules')" | python | grep -i fuse
SimpleDialog		codecs		llfuse		smtpd
_sre			fuse		poplib		token
_ssl			fuseparts	posix		tokenize

$ echo "help('modules')" | python3.4 | grep -i fuse
Also für Python3 hab ich offensichtlich keine fuse Module, und Mit 2.6 und 2.7 will's irgendwie auch nicht. Kenn mich aber selber nix aus. Was läuft schief?

Das beautifulsoup4 hab ich auf beiden Systemen drauf, python-fuse eben auch, aber halt nur für Python 2.x eben.

Was jetz?

Edit: Ah, die Scripte ham keine Shebang Lines... Man muß also immer explizit mit python aufrufen. Beim Aufruf mit 2.x bekomme ich jetzt das:

Code:
$ python ./test_ocatfs.py
Traceback (most recent call last):
  File "./ocatfs.py", line 6, in <module>
    import requests
ImportError: No module named requests
Der ImportError betrifft beide Skripte. Brauch ich noch Python Packages?


mat schrieb am 27.01.2017 um 11:40

Geiles Projekt! :cool:

GAT, am besten du holst dir pip und installierst die notwendigen Python-Pakete: requests, bs4, fusepy

Ich schaus mir auch gerade an.




overclockers.at v4.thecommunity
© all rights reserved by overclockers.at 2000-2025