GithubHelp home page GithubHelp logo

imamhossain94 / dhaka-city-local-bus-json-data Goto Github PK

View Code? Open in Web Editor NEW
6.0 1.0 4.0 16.96 MB

Scrapped JSON data from busroutebd.com

Home Page: https://busroutebd.com/terms-and-conditions/

Python 100.00%
python3 scraping json

dhaka-city-local-bus-json-data's Introduction

dhaka-city-local-bus-json-data

Img

Image Data source:

JSON Data:

{
  "data": [
    {
      "english": "Achim Paribahan",
      "bangle": "আছিম পরিবহন",
      "image": "https://firebasestorage.googleapis.com/v0/b/bd-bus-route-32221.appspot.com/o/buses%2F%E0%A6%86%E0%A6%9B%E0%A6%BF%E0%A6%AE%20%E0%A6%AA%E0%A6%B0%E0%A6%BF%E0%A6%AC%E0%A6%B9%E0%A6%A8.jpg?alt=media&token=796ceee2-da0e-4ae4-9ffd-74a0f6c7a6ee",
      "routes": [
        "Gabtoli", "Technical", "Ansar Camp", "Mirpur 1", "Sony Cinema Hall", "Mirpur 2", "Mirpur 10", "Mirpur 11", "Purobi", "Kalshi", "ECB Square", "MES", "Shewra", "Kuril Bishwa Road", "Jamuna Future Park", "Bashundhara", "Nadda", "Notun Bazar", "Bashtola","Shahjadpur", "Uttar Badda", "Badda – Madhya Badda", "Merul", "Rampura Bridge", "Banasree", "Demra Staff Quarter"
      ],
      "time": "",
      "service_type": "Semi-Sitting Service(Check System)"
    }
  ]
}

Dart Model: json_to_dart

class BusData {
  List<Data> data;

  BusData({this.data});

  BusData.fromJson(Map<String, dynamic> json) {
    if (json['data'] != null) {
      data = new List<Data>();
      json['data'].forEach((v) {
        data.add(new Data.fromJson(v));
      });
    }
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    if (this.data != null) {
      data['data'] = this.data.map((v) => v.toJson()).toList();
    }
    return data;
  }
}

class Data {
  String english;
  String bangle;
  String image;
  List<String> routes;
  String time;
  String serviceType;

  Data({this.english, this.bangle, this.image, this.routes, this.time, this.serviceType});

  Data.fromJson(Map<String, dynamic> json) {
    english = json['english'];
    bangle = json['bangle'];
    image = json['image'];
    routes = json['routes'].cast<String>();
    time = json['time'];
    serviceType = json['service_type'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['english'] = this.english;
    data['bangle'] = this.bangle;
    data['image'] = this.image;
    data['routes'] = this.routes;
    data['time'] = this.time;
    data['service_type'] = this.serviceType;
    return data;
  }
}

Kotlin Data Model: json2kotlin

implementation "com.google.code.gson:gson:2.8.8"

val json = getJson()
val topic = Gson().fromJson(json, BusData::class.java)

data class BusData (
	@SerializedName("data") val data : List<Data>
)

data class Data (
	@SerializedName("english") val english : String,
	@SerializedName("bangle") val bangle : String,
	@SerializedName("bangle") val image : String,
	@SerializedName("routes") val routes : List<String>,
	@SerializedName("time") val time : String,
	@SerializedName("service_type") val service_type : String
)

Message: It took a lot of time to gather all this information together. Please star this repo if you get helped by this repo. Thank you!

dhaka-city-local-bus-json-data's People

Contributors

imamhossain94 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.