paracrawl / giashard Goto Github PK
View Code? Open in Web Editor NEWSharding program for Paracrawl
Sharding program for Paracrawl
This is not a URL and it barfs because "localhost" makes the hostname parser unhappy:
localhost/ford_a/ford_a_restore_2013_02.html
However it seems this should actually refer to
https://www.old-timer.ch/ford_a/ford_a_restore_2013_02.html
which in fact has parallel text. So we don't want to throw it out.
Idea: if the thing can't be parsed, just take the beginning of the string up to the first / as the slug.
$ giashardid 'www.reddit.com/login/?dest=https%3a%2f%2fwww.reddit.com%2fsubmit%3furl%3dhttp%3a%2f%2fdiyself.gr%2f%25ce%25b4%25ce%25b9%25cf%258e%25ce%25be%25cf%2584%25ce%25b5-%25cf%2584%25ce%25b9%25cf%2582-%25ce%25b3%25ce%25ac%25cf%2584%25ce%25b5%25cf%2582-%25ce%25bc%25ce%25b5-%25ce%25b5%25cf%2585%25ce%25b3%25ce%25b5%25ce%25bd%25ce%25b9%25ce%25ba%25cf%258c-%25cf%2584%25cf%2581%25cf%258c%25cf%2580%25ce%25bf-%25ce%25b1%25cf%2580%25cf%258c%2f%26title%3d%25ce%2594%25ce%25b9%25cf%258e%25ce%25be%25cf%2584%25ce%25b5%2520%25cf%2584%25ce%25b9%25cf%2582%2520%25ce%25b3%25ce%25ac%25cf%2584%25ce%25b5%25cf%2582%2520%25ce%25bc%25ce%25b5%2520%25ce%25b5%25cf%2585%25ce%25b3%25ce%25b5%25ce%25bd%25ce%25b9%25ce%25ba%25cf%258c%2520%25cf%2584%25cf%2581%25cf%258c%25cf%2580%25ce%25bf%2520%25ce%25b1%25cf%2580%25cf%258c%2520%25cf%2584%25ce%25b1%2520%25ce%25bb%25ce%25bf%25cf%2585%25ce%25bb%25ce%25bf%25cf%258d%25ce%25b4%25ce%25b9%25ce%25b1%2520%25cf%2583%25ce%25b1%25cf%2582.'
2020/02/28 09:39:04 main.go:61: Error computing shard id: www.reddit.com/login/?dest=https%3a%2f%2fwww.reddit.com%2fsubmit%3furl%3dhttp%3a%2f%2fdiyself.gr%2f%25ce%25b4%25ce%25b9%25cf%258e%25ce%25be%25cf%2584%25ce%25b5-%25cf%2584%25ce%25b9%25cf%2582-%25ce%25b3%25ce%25ac%25cf%2584%25ce%25b5%25cf%2582-%25ce%25bc%25ce%25b5-%25ce%25b5%25cf%2585%25ce%25b3%25ce%25b5%25ce%25bd%25ce%25b9%25ce%25ba%25cf%258c-%25cf%2584%25cf%2581%25cf%258c%25cf%2580%25ce%25bf-%25ce%25b1%25cf%2580%25cf%258c%2f%26title%3d%25ce%2594%25ce%25b9%25cf%258e%25ce%25be%25cf%2584%25ce%25b5%2520%25cf%2584%25ce%25b9%25cf%2582%2520%25ce%25b3%25ce%25ac%25cf%2584%25ce%25b5%25cf%2582%2520%25ce%25bc%25ce%25b5%2520%25ce%25b5%25cf%2585%25ce%25b3%25ce%25b5%25ce%25bd%25ce%25b9%25ce%25ba%25cf%258c%2520%25cf%2584%25cf%2581%25cf%258c%25cf%2580%25ce%25bf%2520%25ce%25b1%25cf%2580%25cf%258c%2520%25cf%2584%25ce%25b1%2520%25ce%25bb%25ce%25bf%25cf%2585%25ce%25bb%25ce%25bf%25cf%258d%25ce%25b4%25ce%25b9%25ce%25b1%2520%25cf%2583%25ce%25b1%25cf%2582. is a suffix
What do we do about:
folkloren_klub_ritam.artbf.com
Surprisingly, this actually manages to resolve despite _
being an invalid character in a host name. Should we accept _
in our kludge to resolve #1 or should we produce an error? Maybe it is best to apply Postel's Law...
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.