Skip to content

Instantly share code, notes, and snippets.

View anovsiradj's full-sized avatar

MDMCDC anovsiradj

View GitHub Profile
@anovsiradj
anovsiradj / comments.xhtml
Created August 5, 2017 17:04
NeAR Blogger Snippets
<h3 class='post-title entry-title pd-t-16 mg-t-8 mg-b-8 hidden-print' id='core_comments_nav'><span>Komentar</span>
<button class='btn btn-warning btn-xs bd-rad-0' data-toggle='tab' href='#comment-b' role='tab'>B</button>
<button class='btn btn-primary btn-xs bd-rad-0' data-toggle='tab' href='#comment-fb' role='tab'>FB</button>
<button class='btn btn-info btn-xs bd-rad-0' data-toggle='tab' href='#comment-disqus' role='tab'>Disqus</button>
</h3>
<div class='tab-content hidden-print' id='core_comments'>
<div class='tab-pane' id='comment-fb'><div class='fb-comments' data-numposts='5' data-width='100%' expr:data-href='data:post.url.canonical'/></div>
<div class='tab-pane active' id='comment-b'>
<b:if cond='data:post.commentSource == 1'>
<b:include data='post' name='iframe_comments'/>

Have you ever wanted to get a specific data from another website but there's no API available for it? That's where Web Scraping comes in, if the data is not made available by the website we can just scrape it from the website itself.

But before we dive in let us first define what web scraping is. According to Wikipedia:

Web scraping (web harvesting or web data extraction) is a computer software technique of extracting information from websites. Usually, such software programs simulate human exploration of the World Wide Web by either implementing low-level Hypertext Transfer Protocol (HTTP), or embedding a fully-fledged web browser, such as Internet Explorer or Mozilla Firefox.

So yes, web scraping lets us extract information from websites. But the thing is there are some legal issues regarding web scraping.

@anovsiradj
anovsiradj / datetime.bat
Last active April 12, 2017 05:37
Windows: cmd-datetime to Clipboard
:: DateTime to Clipboard
:: @author anovsiradj (http://ne-a-r.blogspot.com/ncr) <anov.siradj22@gmail.com>
:: @created 2016-05-04 , 09:23:44 (kerja3)
:: Result (in clipboard) yyyymmddhhii (no ss)
::pustaka
::http://ss64.com/nt/syntax-substring.html
::http://stackoverflow.com/questions/2772456/string-replacement-in-batch-file/2773504#2773504
::http://www.robvanderwoude.com/escapechars.php
@anovsiradj
anovsiradj / README.md
Last active May 25, 2017 07:36
HTML CountDown

Countdown

😢

Tiny PHP script to generate static DirectoryIndex

  • With Dark Theme
  • Prompt asking to override, if index.html is already exist
@anovsiradj
anovsiradj / README.md
Last active October 27, 2016 04:43
Windows - Install Node.js and NPM.js
// 201605201035, 201608100851
$('#side-menu').find('li.active:first').each(function() {
$(this).children('a').css('color','#eee');
$(this).parentsUntil('#side-menu','li').children('a').each(function() {
$(this).css('color','#eee').trigger('click');
});
});
@anovsiradj
anovsiradj / layout.xml
Created June 8, 2016 13:46
Blogger (blogspot) dynamic CSS class.
<!-- put inside <head/> tag -->
<style>
<b:loop index='i' values='1 to 100' var='n'>
<b:if cond='data:n%5 == 0'>
.w-<data:n/>p {width:<data:n/>%;}
.h-<data:n/>p {height:<data:n/>%;}
</b:if>
</b:loop>
</style>
@anovsiradj
anovsiradj / class-object.php
Created May 28, 2016 16:40
playing with php class object
<?php
// 201602211052, 201605282339
error_reporting(E_ALL); ini_set('display_errors', 1);
class Anoop {
public function bend($elm,$attack) {
if (!isset($this->{$elm})) {
$this->{$elm} = new ELement($elm);
}
$this->{$elm}->technique($attack);
@anovsiradj
anovsiradj / DIBACA.md
Last active May 14, 2016 13:56
Flex Actionscript

Menggunakan Flex.

mxmlc path/to/StageExample.as

Kode demo untuk tutorial di Youtube